Commit 8e27273d by sunxiwang

客户流失参数查询,员工活码查询参数校验

1 parent c7d33e88
...@@ -15,6 +15,7 @@ import com.linkwechat.wecom.service.IWeEmpleCodeService; ...@@ -15,6 +15,7 @@ import com.linkwechat.wecom.service.IWeEmpleCodeService;
import com.linkwechat.wecom.service.IWeFlowerCustomerRelService; import com.linkwechat.wecom.service.IWeFlowerCustomerRelService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -70,7 +71,7 @@ public class WeEmpleCodeController extends BaseController { ...@@ -70,7 +71,7 @@ public class WeEmpleCodeController extends BaseController {
@PreAuthorize("@ss.hasPermi('wecom:code:add')") @PreAuthorize("@ss.hasPermi('wecom:code:add')")
@Log(title = "员工活码", businessType = BusinessType.INSERT) @Log(title = "员工活码", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
public AjaxResult add(@RequestBody WeEmpleCode weEmpleCode) { public AjaxResult add(@RequestBody @Validated WeEmpleCode weEmpleCode) {
try { try {
weEmpleCodeService.insertWeEmpleCode(weEmpleCode); weEmpleCodeService.insertWeEmpleCode(weEmpleCode);
return AjaxResult.success(); return AjaxResult.success();
...@@ -91,7 +92,7 @@ public class WeEmpleCodeController extends BaseController { ...@@ -91,7 +92,7 @@ public class WeEmpleCodeController extends BaseController {
@PreAuthorize("@ss.hasPermi('wecom:code:batchAdd')") @PreAuthorize("@ss.hasPermi('wecom:code:batchAdd')")
@Log(title = "批量新增员工活码", businessType = BusinessType.INSERT) @Log(title = "批量新增员工活码", businessType = BusinessType.INSERT)
@PostMapping("/batchAdd") @PostMapping("/batchAdd")
public AjaxResult batchAdd(@RequestBody WeEmpleCode weEmpleCode) { public AjaxResult batchAdd(@RequestBody @Validated WeEmpleCode weEmpleCode) {
try { try {
weEmpleCodeService.insertWeEmpleCodeBatch(weEmpleCode); weEmpleCodeService.insertWeEmpleCodeBatch(weEmpleCode);
return AjaxResult.success(); return AjaxResult.success();
......
...@@ -3,6 +3,7 @@ package com.linkwechat.wecom.domain; ...@@ -3,6 +3,7 @@ package com.linkwechat.wecom.domain;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
...@@ -86,4 +87,8 @@ public class WeCustomer extends BaseEntity ...@@ -86,4 +87,8 @@ public class WeCustomer extends BaseEntity
@TableField(exist = false) @TableField(exist = false)
private String tagIds; private String tagIds;
@TableField(exist = false)
@JSONField(defaultValue = "0")
private Integer status;
} }
...@@ -6,6 +6,7 @@ import com.linkwechat.common.core.domain.BaseEntity; ...@@ -6,6 +6,7 @@ import com.linkwechat.common.core.domain.BaseEntity;
import com.linkwechat.common.utils.SnowFlakeUtil; import com.linkwechat.common.utils.SnowFlakeUtil;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotEmpty;
import java.util.List; import java.util.List;
...@@ -17,56 +18,81 @@ import java.util.List; ...@@ -17,56 +18,81 @@ import java.util.List;
*/ */
@Data @Data
@TableName("we_emple_code") @TableName("we_emple_code")
public class WeEmpleCode extends BaseEntity public class WeEmpleCode extends BaseEntity {
{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** $column.columnComment */ /**
* $column.columnComment
*/
private Long id = SnowFlakeUtil.nextId(); private Long id = SnowFlakeUtil.nextId();
/** 活码类型:1:单人;2:多人;3:批量; */ /**
* 活码类型:1:单人;2:多人;3:批量;
*/
private Integer codeType; private Integer codeType;
/** 客户添加时无需经过确认自动成为好友:1:是;0:否 */ /**
* 客户添加时无需经过确认自动成为好友:1:是;0:否
*/
private Boolean isJoinConfirmFriends; private Boolean isJoinConfirmFriends;
/** 活动场景 */ /**
* 活动场景
*/
private String activityScene; private String activityScene;
/** 欢迎语 */ /**
* 欢迎语
*/
private String welcomeMsg; private String welcomeMsg;
/** 素材的id */ /**
* 素材的id
*/
private Long mediaId; private Long mediaId;
/** 0:正常;1:删除; */ /**
private Integer delFlag=new Integer(0); * 0:正常;1:删除;
*/
private Integer delFlag = new Integer(0);
@NotEmpty(message = "员工信息不能为空")
/** 使用员工 */ /** 使用员工 */
@TableField(exist = false) @TableField(exist = false)
private List<WeEmpleCodeUseScop> weEmpleCodeUseScops; private List<WeEmpleCodeUseScop> weEmpleCodeUseScops;
/** 扫码标签 */ /**
* 扫码标签
*/
@TableField(exist = false) @TableField(exist = false)
private List<WeEmpleCodeTag> weEmpleCodeTags; private List<WeEmpleCodeTag> weEmpleCodeTags;
/** 扫码标签 */ /**
* 扫码标签
*/
@TableField(exist = false) @TableField(exist = false)
private WeMaterial weMaterial; private WeMaterial weMaterial;
/** 新增联系方式的配置id */ /**
* 新增联系方式的配置id
*/
private String configId; private String configId;
/** 二维码链接 */ /**
* 二维码链接
*/
private String qrCode; private String qrCode;
/** 使用员工姓名 */ /**
* 使用员工姓名
*/
@TableField(exist = false) @TableField(exist = false)
private String useUserName; private String useUserName;
/** 使用员工手机号 */ /**
* 使用员工手机号
*/
@TableField(exist = false) @TableField(exist = false)
private String mobile; private String mobile;
} }
...@@ -65,6 +65,8 @@ public class ExternalUserDetail extends WeResultDto { ...@@ -65,6 +65,8 @@ public class ExternalUserDetail extends WeResultDto {
private Integer add_way; private Integer add_way;
/**发起添加的userid,如果成员主动添加,为成员的userid;如果是客户主动添加,则为客户的外部联系人userid;如果是内部成员共享/管理员分配,则为对应的成员/管理员userid*/ /**发起添加的userid,如果成员主动添加,为成员的userid;如果是客户主动添加,则为客户的外部联系人userid;如果是内部成员共享/管理员分配,则为对应的成员/管理员userid*/
private String oper_userid; private String oper_userid;
/** 企业自定义的state参数,用于区分客户具体是通过哪个「联系我」添加,由企业通过创建「联系我」方式指定 */
private String state;
/**标签**/ /**标签**/
private List<ExternalUserTag> tags; private List<ExternalUserTag> tags;
} }
......
...@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="operUserid" column="oper_userid" /> <result property="operUserid" column="oper_userid" />
<result property="addWay" column="add_way" /> <result property="addWay" column="add_way" />
<result property="state" column="state" /> <result property="state" column="state" />
<result property="status" column="status" />
<result property="userName" column="user_name"/> <result property="userName" column="user_name"/>
<result property="department" column="department"/> <result property="department" column="department"/>
<collection property="weFlowerCustomerTagRels" ofType="com.linkwechat.wecom.domain.WeFlowerCustomerTagRel"> <collection property="weFlowerCustomerTagRels" ofType="com.linkwechat.wecom.domain.WeFlowerCustomerTagRel">
...@@ -61,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -61,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
wfcr.oper_userid, wfcr.oper_userid,
wfcr.add_way, wfcr.add_way,
wfcr.state, wfcr.state,
wfcr.status,
wu.user_name, wu.user_name,
wfcrf.flower_customer_rel_id, wfcrf.flower_customer_rel_id,
wt.tag_id, wt.tag_id,
...@@ -107,6 +109,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -107,6 +109,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 --> <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
AND date_format(wfcr.create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d') AND date_format(wfcr.create_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if> </if>
<if test="status != null and status !=''">
AND wfcr.status = #{status}
</if>
</where> </where>
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!