微信导粉统计
This commit is contained in:
@ -4,6 +4,7 @@ import lombok.Data;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -57,7 +58,7 @@ public class SysCustomerHealthy extends BaseEntity
|
||||
|
||||
/** 体重 */
|
||||
@Excel(name = "体重")
|
||||
private Long weight;
|
||||
private BigDecimal weight;
|
||||
|
||||
/** 调味品种类,使用 , 隔开 */
|
||||
@Excel(name = "调味品种类,使用 , 隔开")
|
||||
@ -429,6 +430,9 @@ public class SysCustomerHealthy extends BaseEntity
|
||||
@Excel(name = "气血数据")
|
||||
private String bloodData;
|
||||
|
||||
//备注
|
||||
private String remark;
|
||||
|
||||
/** 湿气数据 */
|
||||
@Excel(name = "湿气数据")
|
||||
private String moistureDate;
|
||||
|
@ -0,0 +1,66 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 微信分配管理对象 sys_wx_distribution
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
@Data
|
||||
public class SysWxDistribution extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 后台用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "销售")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 字典表中销售小组对应键值
|
||||
*/
|
||||
private Integer saleGroupId;
|
||||
|
||||
@Excel(name = "销售组别")
|
||||
private String saleGroup;
|
||||
|
||||
/**
|
||||
* 字典表中账号对应键值
|
||||
*/
|
||||
private Integer accountId;
|
||||
|
||||
@Excel(name = "收款账号")
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 微信账号id
|
||||
*/
|
||||
private Long wechatAccount;
|
||||
|
||||
@Excel(name = "微信昵称")
|
||||
private String wxNickName;
|
||||
|
||||
@Excel(name = "微信号")
|
||||
private String wxAccount;
|
||||
|
||||
/**
|
||||
* 微信账号类型,0接粉号 1新号,默认0
|
||||
*/
|
||||
private Integer wechatAccountType;
|
||||
|
||||
/**
|
||||
* 删除标识 0未删除 1已删除,默认0
|
||||
*/
|
||||
private Integer delFlag;
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 进粉统计对象 sys_wx_fan_statistics
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
@Data
|
||||
public class SysWxFanStatistics extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
@Excel(name = "销售")
|
||||
private String userName;
|
||||
|
||||
//销售ID
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "进粉账号")
|
||||
private String account;
|
||||
|
||||
//销售组别
|
||||
private String saleGroup;
|
||||
|
||||
/** 微信号ID */
|
||||
private Long wxId;
|
||||
|
||||
@Excel(name = "微信昵称")
|
||||
private String wxNickName;
|
||||
|
||||
@Excel(name = "微信号")
|
||||
private String wxAccount;
|
||||
|
||||
/** 进粉时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "进粉时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date fanTime;
|
||||
|
||||
/** 进粉个数 */
|
||||
@Excel(name = "进粉个数")
|
||||
private Integer fanNum;
|
||||
|
||||
/** 删除标识 0未删除 1已删除,默认0 */
|
||||
private Integer delFlag;
|
||||
|
||||
//进粉总数量
|
||||
private Integer totalFanNum;
|
||||
|
||||
//销售组别ID
|
||||
private Integer saleGroupId;
|
||||
|
||||
//排序参数,null或者0:按照id倒序 1:按照组别ID、id顺序正序
|
||||
private Integer sortFlag;
|
||||
}
|
@ -1,18 +1,16 @@
|
||||
package com.stdiet.custom.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 微信销售账号对象 sys_wx_sale_account
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2021-01-29
|
||||
* 微信账号对象 sys_wx_sale_account
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
@Data
|
||||
public class SysWxSaleAccount extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -20,28 +18,106 @@ public class SysWxSaleAccount extends BaseEntity
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 账号名称 */
|
||||
@Excel(name = "账号名称")
|
||||
private String nickName;
|
||||
|
||||
/** 账号id */
|
||||
@Excel(name = "账号id")
|
||||
private Long accountId;
|
||||
/** 微信昵称 */
|
||||
@Excel(name = "微信昵称")
|
||||
private String wxNickName;
|
||||
|
||||
/** 微信号 */
|
||||
@Excel(name = "微信号")
|
||||
private String wxId;
|
||||
private String wxAccount;
|
||||
|
||||
/** 手机号 */
|
||||
@Excel(name = "手机号")
|
||||
private String phone;
|
||||
/** 微信手机号 */
|
||||
@Excel(name = "微信手机号")
|
||||
private String wxPhone;
|
||||
|
||||
private String imgUrl;
|
||||
/** 二维码图片 */
|
||||
private String wxCodeUrl;
|
||||
|
||||
private String mediaId;
|
||||
/** 微信类型 */
|
||||
private Integer wxType;
|
||||
|
||||
private String remark;
|
||||
/** 删除标识 0未删除 1已删除,默认0 */
|
||||
private Integer delFlag;
|
||||
|
||||
private Integer count;
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setWxNickName(String wxNickName)
|
||||
{
|
||||
this.wxNickName = wxNickName;
|
||||
}
|
||||
|
||||
public String getWxNickName()
|
||||
{
|
||||
return wxNickName;
|
||||
}
|
||||
public void setWxAccount(String wxAccount)
|
||||
{
|
||||
this.wxAccount = wxAccount;
|
||||
}
|
||||
|
||||
public String getWxAccount()
|
||||
{
|
||||
return wxAccount;
|
||||
}
|
||||
public void setWxPhone(String wxPhone)
|
||||
{
|
||||
this.wxPhone = wxPhone;
|
||||
}
|
||||
|
||||
public String getWxPhone()
|
||||
{
|
||||
return wxPhone;
|
||||
}
|
||||
public void setWxCodeUrl(String wxCodeUrl)
|
||||
{
|
||||
this.wxCodeUrl = wxCodeUrl;
|
||||
}
|
||||
|
||||
public String getWxCodeUrl()
|
||||
{
|
||||
return wxCodeUrl;
|
||||
}
|
||||
public void setWxType(Integer wxType)
|
||||
{
|
||||
this.wxType = wxType;
|
||||
}
|
||||
|
||||
public Integer getWxType()
|
||||
{
|
||||
return wxType;
|
||||
}
|
||||
public void setDelFlag(Integer delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public Integer getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("wxNickName", getWxNickName())
|
||||
.append("wxAccount", getWxAccount())
|
||||
.append("wxPhone", getWxPhone())
|
||||
.append("wxCodeUrl", getWxCodeUrl())
|
||||
.append("remark", getRemark())
|
||||
.append("wxType", getWxType())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.stdiet.custom.dto.request;
|
||||
|
||||
import com.stdiet.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class FanStatisticsRequest extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//销售用户ID
|
||||
private Long userId;
|
||||
|
||||
//进粉统计日期
|
||||
private Date fanTime;
|
||||
|
||||
//微信ID数组
|
||||
private Long[] wxId;
|
||||
|
||||
//微信进粉量数组
|
||||
private Integer[] fanNum;
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.stdiet.custom.dto.response;
|
||||
|
||||
import com.stdiet.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExportFanStatisticsResponse {
|
||||
|
||||
//序号
|
||||
@Excel(name = "序号")
|
||||
private Integer id;
|
||||
|
||||
//销售姓名
|
||||
@Excel(name = "销售姓名")
|
||||
private String saleName;
|
||||
|
||||
//账号
|
||||
@Excel(name = "账号")
|
||||
private String account;
|
||||
|
||||
//微信号
|
||||
@Excel(name = "微信号")
|
||||
private String wxAccount;
|
||||
|
||||
//进粉量、
|
||||
@Excel(name = "进粉量")
|
||||
private Integer fanNum;
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysWxDistribution;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 微信分配管理Mapper接口
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
public interface SysWxDistributionMapper
|
||||
{
|
||||
/**
|
||||
* 查询微信分配管理
|
||||
*
|
||||
* @param id 微信分配管理ID
|
||||
* @return 微信分配管理
|
||||
*/
|
||||
public SysWxDistribution selectSysWxDistributionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询微信分配管理列表
|
||||
*
|
||||
* @param sysWxDistribution 微信分配管理
|
||||
* @return 微信分配管理集合
|
||||
*/
|
||||
public List<SysWxDistribution> selectSysWxDistributionList(SysWxDistribution sysWxDistribution);
|
||||
|
||||
/**
|
||||
* 新增微信分配管理
|
||||
*
|
||||
* @param sysWxDistribution 微信分配管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysWxDistribution(SysWxDistribution sysWxDistribution);
|
||||
|
||||
/**
|
||||
* 修改微信分配管理
|
||||
*
|
||||
* @param sysWxDistribution 微信分配管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysWxDistribution(SysWxDistribution sysWxDistribution);
|
||||
|
||||
/**
|
||||
* 删除微信分配管理
|
||||
*
|
||||
* @param id 微信分配管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxDistributionById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除微信分配管理
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxDistributionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据微信ID查询是否分配记录
|
||||
* @param wxId
|
||||
* @return
|
||||
*/
|
||||
SysWxDistribution selectWxDistributionByWxId(@Param("wxId")Long wxId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询该用户被分配的微信号
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<SysWxDistribution> selectDistributionWxByUserId(@Param("userId")Long userId);
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysWxFanStatistics;
|
||||
|
||||
/**
|
||||
* 进粉统计Mapper接口
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
public interface SysWxFanStatisticsMapper
|
||||
{
|
||||
/**
|
||||
* 查询进粉统计
|
||||
*
|
||||
* @param id 进粉统计ID
|
||||
* @return 进粉统计
|
||||
*/
|
||||
public SysWxFanStatistics selectSysWxFanStatisticsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询进粉统计列表
|
||||
*
|
||||
* @param sysWxFanStatistics 进粉统计
|
||||
* @return 进粉统计集合
|
||||
*/
|
||||
public List<SysWxFanStatistics> selectSysWxFanStatisticsList(SysWxFanStatistics sysWxFanStatistics);
|
||||
|
||||
/**
|
||||
* 新增进粉统计
|
||||
*
|
||||
* @param sysWxFanStatistics 进粉统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysWxFanStatistics(SysWxFanStatistics sysWxFanStatistics);
|
||||
|
||||
/**
|
||||
* 修改进粉统计
|
||||
*
|
||||
* @param sysWxFanStatistics 进粉统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysWxFanStatistics(SysWxFanStatistics sysWxFanStatistics);
|
||||
|
||||
/**
|
||||
* 删除进粉统计
|
||||
*
|
||||
* @param id 进粉统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxFanStatisticsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除进粉统计
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxFanStatisticsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据用户ID和进粉统计日期查询进粉统计记录
|
||||
*/
|
||||
public List<SysWxFanStatistics> getWxFanStatisticsByUserIdAndFanTime(SysWxFanStatistics sysWxFanStatistics);
|
||||
|
||||
/**
|
||||
* 查询总进粉数量
|
||||
* @param sysWxFanStatistics
|
||||
* @return
|
||||
*/
|
||||
public int selectFanNumCount(SysWxFanStatistics sysWxFanStatistics);
|
||||
}
|
@ -4,58 +4,65 @@ import java.util.List;
|
||||
import com.stdiet.custom.domain.SysWxSaleAccount;
|
||||
|
||||
/**
|
||||
* 微信销售账号Mapper接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2021-01-29
|
||||
* 微信账号Mapper接口
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
public interface SysWxSaleAccountMapper
|
||||
public interface SysWxSaleAccountMapper
|
||||
{
|
||||
/**
|
||||
* 查询微信销售账号
|
||||
*
|
||||
* @param id 微信销售账号ID
|
||||
* @return 微信销售账号
|
||||
* 查询微信账号
|
||||
*
|
||||
* @param id 微信账号ID
|
||||
* @return 微信账号
|
||||
*/
|
||||
public SysWxSaleAccount selectSysWxSaleAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 查询微信销售账号列表
|
||||
*
|
||||
* @param sysWxSaleAccount 微信销售账号
|
||||
* @return 微信销售账号集合
|
||||
* 查询微信账号列表
|
||||
*
|
||||
* @param sysWxSaleAccount 微信账号
|
||||
* @return 微信账号集合
|
||||
*/
|
||||
public List<SysWxSaleAccount> selectSysWxSaleAccountList(SysWxSaleAccount sysWxSaleAccount);
|
||||
|
||||
/**
|
||||
* 新增微信销售账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信销售账号
|
||||
* 新增微信账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信账号
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysWxSaleAccount(SysWxSaleAccount sysWxSaleAccount);
|
||||
|
||||
/**
|
||||
* 修改微信销售账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信销售账号
|
||||
* 修改微信账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信账号
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysWxSaleAccount(SysWxSaleAccount sysWxSaleAccount);
|
||||
|
||||
/**
|
||||
* 删除微信销售账号
|
||||
*
|
||||
* @param id 微信销售账号ID
|
||||
* 删除微信账号
|
||||
*
|
||||
* @param id 微信账号ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxSaleAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除微信销售账号
|
||||
*
|
||||
* 批量删除微信账号
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxSaleAccountByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 根据微信号或手机号查询是否已存在
|
||||
* @param sysWxSaleAccount
|
||||
* @return
|
||||
*/
|
||||
SysWxSaleAccount selectWxAccountByAccountOrPhone(SysWxSaleAccount sysWxSaleAccount);
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysWxDistribution;
|
||||
|
||||
/**
|
||||
* 微信分配管理Service接口
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
public interface ISysWxDistributionService
|
||||
{
|
||||
/**
|
||||
* 查询微信分配管理
|
||||
*
|
||||
* @param id 微信分配管理ID
|
||||
* @return 微信分配管理
|
||||
*/
|
||||
public SysWxDistribution selectSysWxDistributionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询微信分配管理列表
|
||||
*
|
||||
* @param sysWxDistribution 微信分配管理
|
||||
* @return 微信分配管理集合
|
||||
*/
|
||||
public List<SysWxDistribution> selectSysWxDistributionList(SysWxDistribution sysWxDistribution);
|
||||
|
||||
/**
|
||||
* 新增微信分配管理
|
||||
*
|
||||
* @param sysWxDistribution 微信分配管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysWxDistribution(SysWxDistribution sysWxDistribution);
|
||||
|
||||
/**
|
||||
* 修改微信分配管理
|
||||
*
|
||||
* @param sysWxDistribution 微信分配管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysWxDistribution(SysWxDistribution sysWxDistribution);
|
||||
|
||||
/**
|
||||
* 批量删除微信分配管理
|
||||
*
|
||||
* @param ids 需要删除的微信分配管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxDistributionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除微信分配管理信息
|
||||
*
|
||||
* @param id 微信分配管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxDistributionById(Long id);
|
||||
|
||||
/**
|
||||
* 根据微信ID查询是否分配记录
|
||||
* @param wxId
|
||||
* @return
|
||||
*/
|
||||
SysWxDistribution selectWxDistributionByWxId(Long wxId);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询该用户被分配的微信号
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<SysWxDistribution> selectDistributionWxByUserId(Long userId);
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
import com.stdiet.custom.domain.SysWxFanStatistics;
|
||||
import com.stdiet.custom.dto.request.FanStatisticsRequest;
|
||||
|
||||
/**
|
||||
* 进粉统计Service接口
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
public interface ISysWxFanStatisticsService
|
||||
{
|
||||
/**
|
||||
* 查询进粉统计
|
||||
*
|
||||
* @param id 进粉统计ID
|
||||
* @return 进粉统计
|
||||
*/
|
||||
public SysWxFanStatistics selectSysWxFanStatisticsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询进粉统计列表
|
||||
*
|
||||
* @param sysWxFanStatistics 进粉统计
|
||||
* @return 进粉统计集合
|
||||
*/
|
||||
public List<SysWxFanStatistics> selectSysWxFanStatisticsList(SysWxFanStatistics sysWxFanStatistics);
|
||||
|
||||
/**
|
||||
* 新增进粉统计
|
||||
*
|
||||
* @param sysWxFanStatistics 进粉统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysWxFanStatistics(SysWxFanStatistics sysWxFanStatistics);
|
||||
|
||||
/**
|
||||
* 修改进粉统计
|
||||
*
|
||||
* @param sysWxFanStatistics 进粉统计
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysWxFanStatistics(SysWxFanStatistics sysWxFanStatistics);
|
||||
|
||||
/**
|
||||
* 批量删除进粉统计
|
||||
*
|
||||
* @param ids 需要删除的进粉统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxFanStatisticsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除进粉统计信息
|
||||
*
|
||||
* @param id 进粉统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxFanStatisticsById(Long id);
|
||||
|
||||
/**
|
||||
* 同时给多个微信号添加进粉量统计
|
||||
* @param fanStatisticsRequest
|
||||
* @return
|
||||
*/
|
||||
AjaxResult addWxFanNum(FanStatisticsRequest fanStatisticsRequest);
|
||||
|
||||
/**
|
||||
* 根据用户ID、微信ID、进粉时间查询统计
|
||||
* @param sysWxFanStatistics
|
||||
* @return
|
||||
*/
|
||||
List<SysWxFanStatistics> getWxFanStatisticsByUserIdAndFanTime(SysWxFanStatistics sysWxFanStatistics);
|
||||
|
||||
/**
|
||||
* 查询总进粉数量
|
||||
* @param sysWxFanStatistics
|
||||
* @return
|
||||
*/
|
||||
public int selectFanNumCount(SysWxFanStatistics sysWxFanStatistics);
|
||||
}
|
@ -1,64 +1,69 @@
|
||||
package com.stdiet.custom.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
import com.stdiet.custom.domain.SysWxSaleAccount;
|
||||
|
||||
/**
|
||||
* 微信销售账号Service接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2021-01-29
|
||||
* 微信账号Service接口
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
public interface ISysWxSaleAccountService
|
||||
public interface ISysWxSaleAccountService
|
||||
{
|
||||
/**
|
||||
* 查询微信销售账号
|
||||
*
|
||||
* @param id 微信销售账号ID
|
||||
* @return 微信销售账号
|
||||
* 查询微信账号
|
||||
*
|
||||
* @param id 微信账号ID
|
||||
* @return 微信账号
|
||||
*/
|
||||
public SysWxSaleAccount selectSysWxSaleAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 查询微信销售账号列表
|
||||
*
|
||||
* @param sysWxSaleAccount 微信销售账号
|
||||
* @return 微信销售账号集合
|
||||
* 查询微信账号列表
|
||||
*
|
||||
* @param sysWxSaleAccount 微信账号
|
||||
* @return 微信账号集合
|
||||
*/
|
||||
public List<SysWxSaleAccount> selectSysWxSaleAccountList(SysWxSaleAccount sysWxSaleAccount);
|
||||
|
||||
/**
|
||||
* 新增微信销售账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信销售账号
|
||||
* 新增微信账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信账号
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysWxSaleAccount(SysWxSaleAccount sysWxSaleAccount);
|
||||
|
||||
/**
|
||||
* 修改微信销售账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信销售账号
|
||||
* 修改微信账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信账号
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysWxSaleAccount(SysWxSaleAccount sysWxSaleAccount);
|
||||
|
||||
/**
|
||||
* 批量删除微信销售账号
|
||||
*
|
||||
* @param ids 需要删除的微信销售账号ID
|
||||
* 批量删除微信账号
|
||||
*
|
||||
* @param ids 需要删除的微信账号ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxSaleAccountByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除微信销售账号信息
|
||||
*
|
||||
* @param id 微信销售账号ID
|
||||
* 删除微信账号信息
|
||||
*
|
||||
* @param id 微信账号ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysWxSaleAccountById(Long id);
|
||||
|
||||
/**
|
||||
* 根据微信号或手机号查询是否已存在
|
||||
* @param accountOrPhone 手机号或微信号
|
||||
* @param type 0微信号 1手机号
|
||||
* @return
|
||||
*/
|
||||
SysWxSaleAccount selectWxAccountByAccountOrPhone(String accountOrPhone, int type);
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysWxDistributionMapper;
|
||||
import com.stdiet.custom.domain.SysWxDistribution;
|
||||
import com.stdiet.custom.service.ISysWxDistributionService;
|
||||
|
||||
/**
|
||||
* 微信分配管理Service业务层处理
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
@Service
|
||||
public class SysWxDistributionServiceImpl implements ISysWxDistributionService
|
||||
{
|
||||
@Autowired
|
||||
private SysWxDistributionMapper sysWxDistributionMapper;
|
||||
|
||||
/**
|
||||
* 查询微信分配管理
|
||||
*
|
||||
* @param id 微信分配管理ID
|
||||
* @return 微信分配管理
|
||||
*/
|
||||
@Override
|
||||
public SysWxDistribution selectSysWxDistributionById(Long id)
|
||||
{
|
||||
return sysWxDistributionMapper.selectSysWxDistributionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询微信分配管理列表
|
||||
*
|
||||
* @param sysWxDistribution 微信分配管理
|
||||
* @return 微信分配管理
|
||||
*/
|
||||
@Override
|
||||
public List<SysWxDistribution> selectSysWxDistributionList(SysWxDistribution sysWxDistribution)
|
||||
{
|
||||
return sysWxDistributionMapper.selectSysWxDistributionList(sysWxDistribution);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增微信分配管理
|
||||
*
|
||||
* @param sysWxDistribution 微信分配管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysWxDistribution(SysWxDistribution sysWxDistribution)
|
||||
{
|
||||
sysWxDistribution.setCreateTime(DateUtils.getNowDate());
|
||||
return sysWxDistributionMapper.insertSysWxDistribution(sysWxDistribution);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改微信分配管理
|
||||
*
|
||||
* @param sysWxDistribution 微信分配管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysWxDistribution(SysWxDistribution sysWxDistribution)
|
||||
{
|
||||
sysWxDistribution.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysWxDistributionMapper.updateSysWxDistribution(sysWxDistribution);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除微信分配管理
|
||||
*
|
||||
* @param ids 需要删除的微信分配管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysWxDistributionByIds(Long[] ids)
|
||||
{
|
||||
return sysWxDistributionMapper.deleteSysWxDistributionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除微信分配管理信息
|
||||
*
|
||||
* @param id 微信分配管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysWxDistributionById(Long id)
|
||||
{
|
||||
return sysWxDistributionMapper.deleteSysWxDistributionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据微信ID查询是否分配记录
|
||||
* @param wxId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysWxDistribution selectWxDistributionByWxId(Long wxId){
|
||||
return sysWxDistributionMapper.selectWxDistributionByWxId(wxId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID查询该用户被分配的微信号
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public List<SysWxDistribution> selectDistributionWxByUserId(Long userId){
|
||||
return sysWxDistributionMapper.selectDistributionWxByUserId(userId);
|
||||
}
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.stdiet.common.core.domain.AjaxResult;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import com.stdiet.custom.dto.request.FanStatisticsRequest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysWxFanStatisticsMapper;
|
||||
import com.stdiet.custom.domain.SysWxFanStatistics;
|
||||
import com.stdiet.custom.service.ISysWxFanStatisticsService;
|
||||
|
||||
/**
|
||||
* 进粉统计Service业务层处理
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
@Service
|
||||
public class SysWxFanStatisticsServiceImpl implements ISysWxFanStatisticsService
|
||||
{
|
||||
@Autowired
|
||||
private SysWxFanStatisticsMapper sysWxFanStatisticsMapper;
|
||||
|
||||
/**
|
||||
* 查询进粉统计
|
||||
*
|
||||
* @param id 进粉统计ID
|
||||
* @return 进粉统计
|
||||
*/
|
||||
@Override
|
||||
public SysWxFanStatistics selectSysWxFanStatisticsById(Long id)
|
||||
{
|
||||
return sysWxFanStatisticsMapper.selectSysWxFanStatisticsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询进粉统计列表
|
||||
*
|
||||
* @param sysWxFanStatistics 进粉统计
|
||||
* @return 进粉统计
|
||||
*/
|
||||
@Override
|
||||
public List<SysWxFanStatistics> selectSysWxFanStatisticsList(SysWxFanStatistics sysWxFanStatistics)
|
||||
{
|
||||
return sysWxFanStatisticsMapper.selectSysWxFanStatisticsList(sysWxFanStatistics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增进粉统计
|
||||
*
|
||||
* @param sysWxFanStatistics 进粉统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysWxFanStatistics(SysWxFanStatistics sysWxFanStatistics)
|
||||
{
|
||||
sysWxFanStatistics.setCreateTime(DateUtils.getNowDate());
|
||||
return sysWxFanStatisticsMapper.insertSysWxFanStatistics(sysWxFanStatistics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改进粉统计
|
||||
*
|
||||
* @param sysWxFanStatistics 进粉统计
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysWxFanStatistics(SysWxFanStatistics sysWxFanStatistics)
|
||||
{
|
||||
sysWxFanStatistics.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysWxFanStatisticsMapper.updateSysWxFanStatistics(sysWxFanStatistics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除进粉统计
|
||||
*
|
||||
* @param ids 需要删除的进粉统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysWxFanStatisticsByIds(Long[] ids)
|
||||
{
|
||||
return sysWxFanStatisticsMapper.deleteSysWxFanStatisticsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除进粉统计信息
|
||||
*
|
||||
* @param id 进粉统计ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysWxFanStatisticsById(Long id)
|
||||
{
|
||||
return sysWxFanStatisticsMapper.deleteSysWxFanStatisticsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID、微信ID、进粉时间查询统计
|
||||
* @param sysWxFanStatistics
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SysWxFanStatistics> getWxFanStatisticsByUserIdAndFanTime(SysWxFanStatistics sysWxFanStatistics){
|
||||
return sysWxFanStatisticsMapper.getWxFanStatisticsByUserIdAndFanTime(sysWxFanStatistics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同时给多个微信号添加进粉量统计
|
||||
* @param fanStatisticsRequest
|
||||
* @return
|
||||
*/
|
||||
public AjaxResult addWxFanNum(FanStatisticsRequest fanStatisticsRequest){
|
||||
int row = 0;
|
||||
if(fanStatisticsRequest.getWxId() != null && fanStatisticsRequest.getUserId() != null){
|
||||
SysWxFanStatistics param = new SysWxFanStatistics();
|
||||
param.setUserId(fanStatisticsRequest.getUserId());
|
||||
param.setFanTime(fanStatisticsRequest.getFanTime());
|
||||
//查询今日是否已添加
|
||||
List<SysWxFanStatistics> oldWxFanStatisticsList = getWxFanStatisticsByUserIdAndFanTime(param);
|
||||
if(oldWxFanStatisticsList != null && oldWxFanStatisticsList.size() > 0){
|
||||
return AjaxResult.error("今日已添加过进粉统计,无法重复添加");
|
||||
}
|
||||
int index = 0;
|
||||
for (Long wxId : fanStatisticsRequest.getWxId()) {
|
||||
SysWxFanStatistics sysWxFanStatistics = new SysWxFanStatistics();
|
||||
sysWxFanStatistics.setWxId(wxId);
|
||||
sysWxFanStatistics.setFanTime(fanStatisticsRequest.getFanTime());
|
||||
sysWxFanStatistics.setFanNum(fanStatisticsRequest.getFanNum()[index++]);
|
||||
sysWxFanStatistics.setUserId(fanStatisticsRequest.getUserId());
|
||||
row = insertSysWxFanStatistics(sysWxFanStatistics);
|
||||
}
|
||||
}
|
||||
return row > 0 ? AjaxResult.success() : AjaxResult.error("添加失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询总进粉数量
|
||||
* @param sysWxFanStatistics
|
||||
* @return
|
||||
*/
|
||||
public int selectFanNumCount(SysWxFanStatistics sysWxFanStatistics){
|
||||
return sysWxFanStatisticsMapper.selectFanNumCount(sysWxFanStatistics);
|
||||
}
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import com.stdiet.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.stdiet.custom.mapper.SysWxSaleAccountMapper;
|
||||
@ -8,22 +10,22 @@ import com.stdiet.custom.domain.SysWxSaleAccount;
|
||||
import com.stdiet.custom.service.ISysWxSaleAccountService;
|
||||
|
||||
/**
|
||||
* 微信销售账号Service业务层处理
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2021-01-29
|
||||
* 微信账号Service业务层处理
|
||||
*
|
||||
* @author xiezhijun
|
||||
* @date 2021-02-03
|
||||
*/
|
||||
@Service
|
||||
public class SysWxSaleAccountServiceImpl implements ISysWxSaleAccountService
|
||||
public class SysWxSaleAccountServiceImpl implements ISysWxSaleAccountService
|
||||
{
|
||||
@Autowired
|
||||
private SysWxSaleAccountMapper sysWxSaleAccountMapper;
|
||||
|
||||
/**
|
||||
* 查询微信销售账号
|
||||
*
|
||||
* @param id 微信销售账号ID
|
||||
* @return 微信销售账号
|
||||
* 查询微信账号
|
||||
*
|
||||
* @param id 微信账号ID
|
||||
* @return 微信账号
|
||||
*/
|
||||
@Override
|
||||
public SysWxSaleAccount selectSysWxSaleAccountById(Long id)
|
||||
@ -32,10 +34,10 @@ public class SysWxSaleAccountServiceImpl implements ISysWxSaleAccountService
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询微信销售账号列表
|
||||
*
|
||||
* @param sysWxSaleAccount 微信销售账号
|
||||
* @return 微信销售账号
|
||||
* 查询微信账号列表
|
||||
*
|
||||
* @param sysWxSaleAccount 微信账号
|
||||
* @return 微信账号
|
||||
*/
|
||||
@Override
|
||||
public List<SysWxSaleAccount> selectSysWxSaleAccountList(SysWxSaleAccount sysWxSaleAccount)
|
||||
@ -44,33 +46,35 @@ public class SysWxSaleAccountServiceImpl implements ISysWxSaleAccountService
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增微信销售账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信销售账号
|
||||
* 新增微信账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信账号
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysWxSaleAccount(SysWxSaleAccount sysWxSaleAccount)
|
||||
{
|
||||
sysWxSaleAccount.setCreateTime(DateUtils.getNowDate());
|
||||
return sysWxSaleAccountMapper.insertSysWxSaleAccount(sysWxSaleAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改微信销售账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信销售账号
|
||||
* 修改微信账号
|
||||
*
|
||||
* @param sysWxSaleAccount 微信账号
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysWxSaleAccount(SysWxSaleAccount sysWxSaleAccount)
|
||||
{
|
||||
sysWxSaleAccount.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysWxSaleAccountMapper.updateSysWxSaleAccount(sysWxSaleAccount);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除微信销售账号
|
||||
*
|
||||
* @param ids 需要删除的微信销售账号ID
|
||||
* 批量删除微信账号
|
||||
*
|
||||
* @param ids 需要删除的微信账号ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@ -80,9 +84,9 @@ public class SysWxSaleAccountServiceImpl implements ISysWxSaleAccountService
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除微信销售账号信息
|
||||
*
|
||||
* @param id 微信销售账号ID
|
||||
* 删除微信账号信息
|
||||
*
|
||||
* @param id 微信账号ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@ -90,4 +94,21 @@ public class SysWxSaleAccountServiceImpl implements ISysWxSaleAccountService
|
||||
{
|
||||
return sysWxSaleAccountMapper.deleteSysWxSaleAccountById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据微信号或手机号查询是否已存在
|
||||
* @param accountOrPhone 手机号或微信号
|
||||
* @param type 0微信号 1手机号
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public SysWxSaleAccount selectWxAccountByAccountOrPhone(String accountOrPhone, int type){
|
||||
SysWxSaleAccount param = new SysWxSaleAccount();
|
||||
if(type == 0){
|
||||
param.setWxAccount(accountOrPhone);
|
||||
}else{
|
||||
param.setWxPhone(accountOrPhone);
|
||||
}
|
||||
return sysWxSaleAccountMapper.selectWxAccountByAccountOrPhone(param);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user