| @@ -12,7 +12,10 @@ import java.util.Map; | |||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.domain.po.WxCouponOrder; | import com.iformall.domain.po.WxCouponOrder; | ||||
| import com.iformall.mapper.WxCUserBasicInfoMapper; | |||||
| import com.iformall.service.WxCUserBasicInfoService; | |||||
| import com.iformall.utils.DataUtil; | import com.iformall.utils.DataUtil; | ||||
| import com.iformall.utils.DateUtils; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -44,6 +47,8 @@ public class WxCUserDataController extends BaseController { | |||||
| private WxUserVisitService wxUserVisitService; | private WxUserVisitService wxUserVisitService; | ||||
| @Autowired | @Autowired | ||||
| private WxCouponOrderService wxCouponOrderService; | private WxCouponOrderService wxCouponOrderService; | ||||
| @Autowired | |||||
| private WxCUserBasicInfoService wxCUserBasicInfoService; | |||||
| @GetMapping("findUserCountData") | @GetMapping("findUserCountData") | ||||
| @ApiOperation("查询用户数量接口") | @ApiOperation("查询用户数量接口") | ||||
| @@ -124,8 +129,21 @@ public class WxCUserDataController extends BaseController { | |||||
| weekVosCount += us.getCount(); | weekVosCount += us.getCount(); | ||||
| } | } | ||||
| map.put("weekVosCount", weekVosCount); //周新增会员 | map.put("weekVosCount", weekVosCount); //周新增会员 | ||||
| map.put("growCount", weekVosCount); //自然增长 | |||||
| map.put("importCount", weekVosCount); //导入 | |||||
| //自然增长(一个月) | |||||
| String startdate = DateUtils.getTimeBefore(30, new Date()); | |||||
| String systemTime = DateUtils.getSystemTime("yyyy-MM-dd"); | |||||
| Date startDate = DateUtils.getDateFromString(startdate + " 00:00:00","yyyy-MM-dd HH:mm:ss").getTime(); | |||||
| Date endDate = DateUtils.getDateFromString(systemTime + " 23:59:59","yyyy-MM-dd HH:mm:ss").getTime(); | |||||
| dto.setStartTime(startDate); | |||||
| dto.setEndTime(endDate); | |||||
| map.put("growCount", wxCUserService.findCount(dto)); | |||||
| //导入 | |||||
| WxCUserBasicInfoDto wxCUserBasicInfoDto = new WxCUserBasicInfoDto(); | |||||
| wxCUserBasicInfoDto.setTenantId(getTenantId()); | |||||
| wxCUserBasicInfoDto.setStartTime(startDate); | |||||
| wxCUserBasicInfoDto.setEndTime(endDate); | |||||
| map.put("importCount", wxCUserBasicInfoService.findCountByFilter(wxCUserBasicInfoDto)); | |||||
| return new ResultData(map); | return new ResultData(map); | ||||
| } | } | ||||
| @@ -64,9 +64,21 @@ public class WxCUserBasicInfoDto implements Serializable{ | |||||
| @Transient | @Transient | ||||
| protected String sortColumns; | protected String sortColumns; | ||||
| //1 查询导入的数据 | |||||
| @Transient | |||||
| protected Integer queryImport; | |||||
| @Transient | @Transient | ||||
| protected List<WxCUserBasicInfoFilterDto> filterList; | protected List<WxCUserBasicInfoFilterDto> filterList; | ||||
| public Integer getQueryImport() { | |||||
| return queryImport; | |||||
| } | |||||
| public void setQueryImport(Integer queryImport) { | |||||
| this.queryImport = queryImport; | |||||
| } | |||||
| public Long getId() { | public Long getId() { | ||||
| return id; | return id; | ||||
| } | } | ||||
| @@ -33,4 +33,6 @@ public interface WxCUserBasicInfoMapper extends CommonMapper<WxCUserBasicInfo, S | |||||
| List<WxCUserBasicInfoVo> findVoList(WxCUserBasicInfo wxCUserBasicInfo); | List<WxCUserBasicInfoVo> findVoList(WxCUserBasicInfo wxCUserBasicInfo); | ||||
| Integer countVoList(WxCUserBasicInfo wxCUserBasicInfo); | Integer countVoList(WxCUserBasicInfo wxCUserBasicInfo); | ||||
| } | } | ||||
| @@ -129,4 +129,6 @@ public interface WxCUserBasicInfoService { | |||||
| * @param response | * @param response | ||||
| */ | */ | ||||
| void exportCarPayData(WxCarPayRecord record, HttpServletRequest request, HttpServletResponse response); | void exportCarPayData(WxCarPayRecord record, HttpServletRequest request, HttpServletResponse response); | ||||
| long findCountByFilter(WxCUserBasicInfoDto dto); | |||||
| } | } | ||||
| @@ -829,5 +829,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { | |||||
| excelService.exportExcel(list,null,sheetName,WxCarPayRecord.class,sheetName+".xls",response); | excelService.exportExcel(list,null,sheetName,WxCarPayRecord.class,sheetName+".xls",response); | ||||
| } | } | ||||
| @Override | |||||
| public long findCountByFilter(WxCUserBasicInfoDto dto) { | |||||
| return wxCUserBasicInfoMapper.findCount(dto); | |||||
| } | |||||
| } | } | ||||
| @@ -397,12 +397,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| // 给审批人发送代办通知短信 | // 给审批人发送代办通知短信 | ||||
| List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstance.getId()); | List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstance.getId()); | ||||
| for (MallUserInfo mallUserInfo:mallUserInfoList) { | for (MallUserInfo mallUserInfo:mallUserInfoList) { | ||||
| sendAssigneeMsgAndEmail(tenantId,mallUserInfo.getPhone(),mallUserInfo.getEmail(),starterInfo.getName(),businessId); | |||||
| sendAssigneeMsgAndEmail(tenantId,mallUserInfo.getPhone(),mallUserInfo.getEmail(),starterInfo.getName(),businessId,flowType); | |||||
| } | } | ||||
| return new ResultData(); | return new ResultData(); | ||||
| } | } | ||||
| public void sendAssigneeMsgAndEmail(String tenantId,String phone,String email,String userName,Long businessId){ | |||||
| public void sendAssigneeMsgAndEmail(String tenantId,String phone,String email,String userName,Long businessId,Integer flowType){ | |||||
| Map<String,String> dynamicContentMap = new HashMap<>(); | Map<String,String> dynamicContentMap = new HashMap<>(); | ||||
| dynamicContentMap.put("userName",userName); | dynamicContentMap.put("userName",userName); | ||||
| dynamicContentMap.put("page", Constant.adminPage); | dynamicContentMap.put("page", Constant.adminPage); | ||||
| @@ -476,6 +476,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| mailMsg.setModelId(EnumMailMsgModel.MAIL_ASSIGNEE_NODIFY.getCode()); | mailMsg.setModelId(EnumMailMsgModel.MAIL_ASSIGNEE_NODIFY.getCode()); | ||||
| mailMsg.setTo(new String[]{email}); | mailMsg.setTo(new String[]{email}); | ||||
| mailMsg.setTenantId(tenantId); | mailMsg.setTenantId(tenantId); | ||||
| if(1 == flowType.intValue() || 3 == flowType.intValue()){ | |||||
| msgReplaceMap.put("bustype","合同"); | |||||
| }else if(2 == flowType.intValue()){ | |||||
| msgReplaceMap.put("bustype","账单"); | |||||
| msgReplaceMap.put("contract", businessId.toString()); | |||||
| } | |||||
| mailMsg.setDynamicContentMap(msgReplaceMap); | mailMsg.setDynamicContentMap(msgReplaceMap); | ||||
| mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | ||||
| } | } | ||||
| @@ -710,7 +716,7 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| String assignee = ""; | String assignee = ""; | ||||
| List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstanceId); | List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstanceId); | ||||
| for (MallUserInfo mallUserInfo:mallUserInfoList) { | for (MallUserInfo mallUserInfo:mallUserInfoList) { | ||||
| sendAssigneeMsgAndEmail(tenantId,mallUserInfo.getPhone(),mallUserInfo.getEmail(),userName,businessId); | |||||
| sendAssigneeMsgAndEmail(tenantId,mallUserInfo.getPhone(),mallUserInfo.getEmail(),userName,businessId,flowType); | |||||
| } | } | ||||
| // 给发起人发送短信 | // 给发起人发送短信 | ||||
| @@ -889,6 +895,12 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| mailMsg.setModelId(EnumMailMsgModel.MAIL_REJECT_NODIFY.getCode()); | mailMsg.setModelId(EnumMailMsgModel.MAIL_REJECT_NODIFY.getCode()); | ||||
| mailMsg.setTo(new String[]{email}); | mailMsg.setTo(new String[]{email}); | ||||
| mailMsg.setTenantId(tenantId); | mailMsg.setTenantId(tenantId); | ||||
| if(1 == flowType.intValue() || 3 == flowType.intValue()){ | |||||
| msgReplaceMap.put("bustype","合同"); | |||||
| }else if(2 == flowType.intValue()){ | |||||
| msgReplaceMap.put("bustype","账单"); | |||||
| msgReplaceMap.put("contract", businessId.toString()); | |||||
| } | |||||
| mailMsg.setDynamicContentMap(msgReplaceMap); | mailMsg.setDynamicContentMap(msgReplaceMap); | ||||
| mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | ||||
| } | } | ||||
| @@ -367,6 +367,9 @@ | |||||
| <if test=" null != phones"> | <if test=" null != phones"> | ||||
| and cu.phone in (${phones}) | and cu.phone in (${phones}) | ||||
| </if> | </if> | ||||
| <if test="1 = queryImport"> | |||||
| and create_date like '%00:00:00' | |||||
| </if> | |||||
| <if test=" null != levelStartScore and (0 != levelStartScore and '' != levelStartScore)"> | <if test=" null != levelStartScore and (0 != levelStartScore and '' != levelStartScore)"> | ||||
| and cu.poins >= #{levelStartScore} | and cu.poins >= #{levelStartScore} | ||||