微信导粉统计
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);
|
||||
}
|
||||
}
|
@ -111,6 +111,7 @@
|
||||
<result property="otherPhysicalSigns" column="other_physical_signs" />
|
||||
<result property="bloodData" column="blood_data" />
|
||||
<result property="moistureDate" column="moisture_date" />
|
||||
<result property="remark" column="remark"></result>
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
@ -122,7 +123,7 @@
|
||||
|
||||
<sql id="selectSysCustomerHealthyVo">
|
||||
select sch.id, customer_id, conditioning_project_id, sex, age, weight, tall, condiment, other_condiment, cooking_style, cooking_style_rate, wash_vegetables_style, other_wash_vegetables_style, breakfast_type, breakfast_food, lunch_type, dinner, vegetable_rate, common_meat, dinner_time, supper_num, supper_food, diet_hot_and_cold, diet_flavor, vegetables_num, vegetables_rate_type, fruits_num, fruits_time, fruits_rate, rice_num, rice_full, eating_speed, snacks, other_snacks, health_products_flag, health_products_brand, health_products_name, health_products_week_rate, health_products_day_rate, water_num, water_type, water_habit, drinks_num, drink_wine_flag, drink_wine_classify, other_wine_classify, drink_wine_amount, smoke_flag, smoke_rate, second_smoke, work_industry, work_type, defecation_num, other_defecation_num, defecation_time, defecation_shape, defecation_smell, defecation_speed, defecation_color, motion_num, motion_duration, motion_time, aerobic_motion_classify, anaerobic_motion_classify, anaerobic_aerobic_motion_classify, other_motion_classify, motion_field, other_motion_field, sleep_time, sleep_quality, sleep_drug_flag, sleep_drug, stayup_late_flag, stayup_late_week_num, family_illness_history, other_family_illness_history, operation_history, other_operation_history, near_operation_flag, recoverye_situation, long_eat_drug_flag, long_eat_drug_classify, other_long_eat_drug_classify, allergy_flag, allergy_situation, allergen, other_allergen, medical_report, medical_report_name,
|
||||
position,experience,rebound,difficulty,crux,dishes_ingredient,make_food_type,physical_signs_id,other_physical_signs,blood_data,moisture_date,
|
||||
position,experience,rebound,difficulty,crux,dishes_ingredient,make_food_type,physical_signs_id,other_physical_signs,blood_data,moisture_date,sch.remark,
|
||||
sch.create_time, sch.create_by,sch. update_time, sch.update_by, sch.del_flag
|
||||
</sql>
|
||||
|
||||
@ -259,6 +260,7 @@
|
||||
<if test="otherPhysicalSigns != null">other_physical_signs,</if>
|
||||
<if test="bloodData != null">blood_data,</if>
|
||||
<if test="moistureDate != null">moisture_date,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
@ -366,6 +368,7 @@
|
||||
<if test="otherPhysicalSigns != null">#{otherPhysicalSigns},</if>
|
||||
<if test="bloodData != null">#{bloodData},</if>
|
||||
<if test="moistureDate != null">#{moistureDate},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
@ -476,6 +479,7 @@
|
||||
<if test="otherPhysicalSigns != null">other_physical_signs = #{otherPhysicalSigns},</if>
|
||||
<if test="bloodData != null">blood_data = #{bloodData},</if>
|
||||
<if test="moistureDate != null">moisture_date = #{moistureDate},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
|
@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.stdiet.custom.mapper.SysWxDistributionMapper">
|
||||
|
||||
<resultMap type="SysWxDistribution" id="SysWxDistributionResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="saleGroupId" column="sale_group_id" />
|
||||
<result property="accountId" column="account_id" />
|
||||
<result property="wechatAccount" column="wechat_account" />
|
||||
<result property="wechatAccountType" column="wechat_account_type" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<!-- 非持久化字段 -->
|
||||
<result property="userName" column="user_name"></result>
|
||||
<result property="account" column="account"></result>
|
||||
<result property="wxNickName" column="wx_nick_name"></result>
|
||||
<result property="wxAccount" column="wx_account"></result>
|
||||
<result property="saleGroup" column="sale_group"></result>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysWxDistributionVo">
|
||||
select id, user_id, sale_group_id, account_id, wechat_account, wechat_account_type, create_time, create_by, update_time, update_by, del_flag from sys_wx_distribution
|
||||
</sql>
|
||||
|
||||
<sql id="selectSysWxDistributionVoExtended">
|
||||
SELECT swd.id, swd.user_id, swd.sale_group_id, swd.account_id, swd.wechat_account,swd.create_time,
|
||||
su.nick_name as user_name,acc.dict_label as account,asg.dict_label as sale_group,
|
||||
swsa.wx_nick_name,swsa.wx_account
|
||||
FROM sys_wx_distribution AS swd
|
||||
lEFT JOIN sys_wx_sale_account swsa ON swsa.id = swd.wechat_account and swsa.del_flag = 0
|
||||
LEFT JOIN sys_user su ON su.user_id = swd.user_id AND su.del_flag = 0
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'fan_channel') AS acc ON acc.dict_value = swd.account_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'sale_group') AS asg ON asg.dict_value = swd.sale_group_id
|
||||
where swd.del_flag = 0
|
||||
</sql>
|
||||
|
||||
<select id="selectSysWxDistributionList" parameterType="SysWxDistribution" resultMap="SysWxDistributionResult">
|
||||
<include refid="selectSysWxDistributionVoExtended"/>
|
||||
<if test="userId != null"> and swd.user_id = #{userId}</if>
|
||||
<if test="saleGroupId != null"> and swd.sale_group_id = #{saleGroupId}</if>
|
||||
<if test="accountId != null"> and swd.account_id = #{accountId}</if>
|
||||
ORDER BY swd.id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectSysWxDistributionById" parameterType="Long" resultMap="SysWxDistributionResult">
|
||||
<include refid="selectSysWxDistributionVo"/>
|
||||
where id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysWxDistribution" parameterType="SysWxDistribution" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_wx_distribution
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="saleGroupId != null">sale_group_id,</if>
|
||||
<if test="accountId != null">account_id,</if>
|
||||
<if test="wechatAccount != null">wechat_account,</if>
|
||||
<if test="wechatAccountType != null">wechat_account_type,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="saleGroupId != null">#{saleGroupId},</if>
|
||||
<if test="accountId != null">#{accountId},</if>
|
||||
<if test="wechatAccount != null">#{wechatAccount},</if>
|
||||
<if test="wechatAccountType != null">#{wechatAccountType},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysWxDistribution" parameterType="SysWxDistribution">
|
||||
update sys_wx_distribution
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="saleGroupId != null">sale_group_id = #{saleGroupId},</if>
|
||||
<if test="accountId != null">account_id = #{accountId},</if>
|
||||
<if test="wechatAccount != null">wechat_account = #{wechatAccount},</if>
|
||||
<if test="wechatAccountType != null">wechat_account_type = #{wechatAccountType},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysWxDistributionById" parameterType="Long">
|
||||
update sys_wx_distribution set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysWxDistributionByIds" parameterType="String">
|
||||
update sys_wx_distribution set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据微信号ID查询分配记录 -->
|
||||
<select id="selectWxDistributionByWxId" parameterType="Long" resultMap="SysWxDistributionResult">
|
||||
<include refid="selectSysWxDistributionVo"/>
|
||||
where wechat_account = #{wxId} and del_flag = 0 limit 1
|
||||
</select>
|
||||
|
||||
<!-- 根据用户ID查询被分配的微信号 -->
|
||||
<select id="selectDistributionWxByUserId" parameterType="Long" resultMap="SysWxDistributionResult">
|
||||
SELECT swd.id, swd.user_id, swd.sale_group_id, swd.account_id, swd.wechat_account,swd.create_time,
|
||||
swsa.wx_nick_name,swsa.wx_account
|
||||
FROM sys_wx_distribution AS swd
|
||||
lEFT JOIN sys_wx_sale_account swsa ON swsa.id = swd.wechat_account and swsa.del_flag = 0
|
||||
where swd.del_flag = 0 and swd.user_id = #{userId} order by swd.id asc
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.stdiet.custom.mapper.SysWxFanStatisticsMapper">
|
||||
|
||||
<resultMap type="SysWxFanStatistics" id="SysWxFanStatisticsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="wxId" column="wx_id" />
|
||||
<result property="fanTime" column="fan_time" />
|
||||
<result property="fanNum" column="fan_num" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<!-- 非持久化字段 -->
|
||||
<result property="saleGroupId" column="sale_group_id"></result>
|
||||
<result property="userId" column="user_id"></result>
|
||||
<result property="userName" column="user_name"></result>
|
||||
<result property="account" column="account"></result>
|
||||
<result property="saleGroup" column="sale_group"></result>
|
||||
<result property="wxNickName" column="wx_nick_name"></result>
|
||||
<result property="wxAccount" column="wx_account"></result>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysWxFanStatisticsVo">
|
||||
select id, wx_id, fan_time, fan_num, create_time, create_by, update_time, update_by, del_flag from sys_wx_fan_statistics
|
||||
</sql>
|
||||
|
||||
<sql id="selectSysWxFanStatisticsVoExtended">
|
||||
select
|
||||
swfs.id, swfs.wx_id, swfs.fan_time, swfs.fan_num, swfs.create_time, swfs.create_by, swfs.update_time, swfs.update_by, swfs.del_flag,
|
||||
su.nick_name as user_name,acc.dict_label as account,asg.dict_label as sale_group,swsa.wx_nick_name,swsa.wx_account,swd.sale_group_id
|
||||
from sys_wx_fan_statistics swfs
|
||||
left join sys_wx_sale_account swsa on swsa.id = swfs.wx_id and swsa.del_flag = 0
|
||||
left join sys_wx_distribution swd on swd.wechat_account = swfs.wx_id and swd.del_flag = 0
|
||||
left join sys_user su on su.user_id = swd.user_id and su.del_flag = 0
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'fan_channel') AS acc ON acc.dict_value = swd.account_id
|
||||
LEFT JOIN (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'sale_group') AS asg ON asg.dict_value = swd.sale_group_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSysWxFanStatisticsList" parameterType="SysWxFanStatistics" resultMap="SysWxFanStatisticsResult">
|
||||
<include refid="selectSysWxFanStatisticsVoExtended"/> where swfs.del_flag = 0
|
||||
<if test="fanTime != null ">and swfs.fan_time = #{fanTime}</if>
|
||||
<if test="userId != null">and su.user_id = #{userId}</if>
|
||||
<if test="sortFlag == null or sortFlag == 0">
|
||||
order by swfs.id desc
|
||||
</if>
|
||||
<if test="sortFlag != null and sortFlag == 1">
|
||||
order by swd.sale_group_id asc,swd.user_id asc
|
||||
</if>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询总进粉数量 -->
|
||||
<select id="selectFanNumCount" parameterType="SysWxFanStatistics" resultType="int">
|
||||
select ifnull(sum(swfs.fan_num),0) from sys_wx_fan_statistics swfs
|
||||
left join sys_wx_distribution swd on swd.wechat_account = swfs.wx_id and swd.del_flag = 0
|
||||
left join sys_user su on su.user_id = swd.user_id and su.del_flag = 0
|
||||
where swfs.del_flag = 0
|
||||
<if test="fanTime != null ">and swfs.fan_time = #{fanTime}</if>
|
||||
<if test="userId != null">and su.user_id = #{userId}</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectSysWxFanStatisticsById" parameterType="Long" resultMap="SysWxFanStatisticsResult">
|
||||
<include refid="selectSysWxFanStatisticsVo"/>
|
||||
where id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysWxFanStatistics" parameterType="SysWxFanStatistics" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_wx_fan_statistics
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="wxId != null">wx_id,</if>
|
||||
<if test="fanTime != null">fan_time,</if>
|
||||
<if test="fanNum != null">fan_num,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="wxId != null">#{wxId},</if>
|
||||
<if test="fanTime != null">#{fanTime},</if>
|
||||
<if test="fanNum != null">#{fanNum},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysWxFanStatistics" parameterType="SysWxFanStatistics">
|
||||
update sys_wx_fan_statistics
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="wxId != null">wx_id = #{wxId},</if>
|
||||
<if test="fanTime != null">fan_time = #{fanTime},</if>
|
||||
<if test="fanNum != null">fan_num = #{fanNum},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysWxFanStatisticsById" parameterType="Long">
|
||||
update sys_wx_fan_statistics set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysWxFanStatisticsByIds" parameterType="String">
|
||||
update sys_wx_fan_statistics set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="getWxFanStatisticsByUserIdAndFanTime" parameterType="SysWxFanStatistics" resultMap="SysWxFanStatisticsResult">
|
||||
select swfs.id, swfs.wx_id, swfs.fan_time, swfs.fan_num, swfs.create_time, swfs.create_by, swfs.update_time, swfs.update_by, swfs.del_flag
|
||||
from sys_wx_fan_statistics swfs
|
||||
left join sys_wx_distribution swd on swd.wechat_account = swfs.wx_id and swd.del_flag = 0
|
||||
where swfs.del_flag = 0
|
||||
<if test="userId != null">and swd.user_id = #{userId} </if>
|
||||
<if test="fanTime != null"> and swfs.fan_time = #{fanTime}</if>
|
||||
<if test="wxId != null">and swfs.wx_id = #{wxId}</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -6,82 +6,99 @@
|
||||
|
||||
<resultMap type="SysWxSaleAccount" id="SysWxSaleAccountResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="accountId" column="account_id" />
|
||||
<result property="wxId" column="wx_id" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="wxNickName" column="wx_nick_name" />
|
||||
<result property="wxAccount" column="wx_account" />
|
||||
<result property="wxPhone" column="wx_phone" />
|
||||
<result property="wxCodeUrl" column="wx_code_url" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="imgUrl" column="img_url" />
|
||||
<result property="count" column="count" />
|
||||
<result property="mediaId" column="media_id" />
|
||||
<result property="wxType" column="wx_type" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysWxSaleAccountVo">
|
||||
select id, nick_name, account_id, wx_id, phone, remark, img_url, count, media_id from sys_wx_sale_account
|
||||
select id, wx_nick_name, wx_account, wx_phone, wx_code_url, remark, wx_type, create_time, create_by, update_time, update_by, del_flag from sys_wx_sale_account
|
||||
</sql>
|
||||
|
||||
<select id="selectSysWxSaleAccountList" parameterType="SysWxSaleAccount" resultMap="SysWxSaleAccountResult">
|
||||
<include refid="selectSysWxSaleAccountVo"/>
|
||||
<where>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="accountId != null "> and account_id = #{accountId}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
</where>
|
||||
<include refid="selectSysWxSaleAccountVo"/> where del_flag = 0
|
||||
<if test="wxNickName != null and wxNickName != ''"> and wx_nick_name like concat('%', #{wxNickName}, '%')</if>
|
||||
<if test="wxAccount != null and wxAccount != ''"> and wx_account like concat('%', #{wxAccount}, '%')</if>
|
||||
<if test="wxPhone != null and wxPhone != ''"> and wx_phone like concat('%', #{wxPhone}, '%')</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSysWxSaleAccountById" parameterType="Long" resultMap="SysWxSaleAccountResult">
|
||||
<include refid="selectSysWxSaleAccountVo"/>
|
||||
where id = #{id}
|
||||
where id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysWxSaleAccount" parameterType="SysWxSaleAccount" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_wx_sale_account
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="nickName != null">nick_name,</if>
|
||||
<if test="accountId != null">account_id,</if>
|
||||
<if test="wxId != null">wx_id,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="wxNickName != null">wx_nick_name,</if>
|
||||
<if test="wxAccount != null">wx_account,</if>
|
||||
<if test="wxPhone != null">wx_phone,</if>
|
||||
<if test="wxCodeUrl != null">wx_code_url,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="imgUrl != null">img_url,</if>
|
||||
<if test="count != null">count,</if>
|
||||
<if test="mediaId != null">media_id,</if>
|
||||
<if test="wxType != null">wx_type,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="nickName != null">#{nickName},</if>
|
||||
<if test="accountId != null">#{accountId},</if>
|
||||
<if test="wxId != null">#{wxId},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="wxNickName != null">#{wxNickName},</if>
|
||||
<if test="wxAccount != null">#{wxAccount},</if>
|
||||
<if test="wxPhone != null">#{wxPhone},</if>
|
||||
<if test="wxCodeUrl != null">#{wxCodeUrl},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="imgUrl != null">#{imgUrl},</if>
|
||||
<if test="count != null">#{count},</if>
|
||||
<if test="mediaId != null">#{mediaId},</if>
|
||||
<if test="wxType != null">#{wxType},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysWxSaleAccount" parameterType="SysWxSaleAccount">
|
||||
update sys_wx_sale_account
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="nickName != null">nick_name = #{nickName},</if>
|
||||
<if test="accountId != null">account_id = #{accountId},</if>
|
||||
<if test="wxId != null">wx_id = #{wxId},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="wxNickName != null">wx_nick_name = #{wxNickName},</if>
|
||||
<if test="wxAccount != null">wx_account = #{wxAccount},</if>
|
||||
<if test="wxPhone != null">wx_phone = #{wxPhone},</if>
|
||||
<if test="wxCodeUrl != null">wx_code_url = #{wxCodeUrl},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="imgUrl != null">img_url = #{imgUrl},</if>
|
||||
<if test="count != null">count = #{count},</if>
|
||||
<if test="mediaId != null">media_id = #{mediaId},</if>
|
||||
<if test="wxType != null">wx_type = #{wxType},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysWxSaleAccountById" parameterType="Long">
|
||||
delete from sys_wx_sale_account where id = #{id}
|
||||
</delete>
|
||||
<update id="deleteSysWxSaleAccountById" parameterType="Long">
|
||||
update sys_wx_sale_account set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysWxSaleAccountByIds" parameterType="String">
|
||||
delete from sys_wx_sale_account where id in
|
||||
<update id="deleteSysWxSaleAccountByIds" parameterType="String">
|
||||
update sys_wx_sale_account set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</update>
|
||||
|
||||
<select id="selectWxAccountByAccountOrPhone" parameterType="SysWxSaleAccount" resultMap="SysWxSaleAccountResult">
|
||||
<include refid="selectSysWxSaleAccountVo"/> where del_flag = 0
|
||||
<if test="wxAccount != null and wxAccount != ''"> and wx_account = #{wxAccount}</if>
|
||||
<if test="wxPhone != null and wxPhone != ''"> and wx_phone = #{wxPhone} </if>
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user