Просмотр исходного кода

[首页统计][修改][完善会员统计]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
de17574988
7 измененных файлов: 58 добавлений и 6 удалений
  1. +20
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/WxCUserDataController.java
  2. +12
    -0
      mallinkService/src/main/java/com/iformall/domain/dto/WxCUserBasicInfoDto.java
  3. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java
  5. +4
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java
  6. +15
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  7. +3
    -0
      mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml

+ 20
- 2
mallinkAdmin/src/main/java/com/iformall/controller/WxCUserDataController.java Просмотреть файл

@@ -12,7 +12,10 @@ import java.util.Map;

import com.iformall.annotation.SystemControllerLog;
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.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -44,6 +47,8 @@ public class WxCUserDataController extends BaseController {
private WxUserVisitService wxUserVisitService;
@Autowired
private WxCouponOrderService wxCouponOrderService;
@Autowired
private WxCUserBasicInfoService wxCUserBasicInfoService;

@GetMapping("findUserCountData")
@ApiOperation("查询用户数量接口")
@@ -124,8 +129,21 @@ public class WxCUserDataController extends BaseController {
weekVosCount += us.getCount();
}
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);
}



+ 12
- 0
mallinkService/src/main/java/com/iformall/domain/dto/WxCUserBasicInfoDto.java Просмотреть файл

@@ -64,9 +64,21 @@ public class WxCUserBasicInfoDto implements Serializable{
@Transient
protected String sortColumns;

//1 查询导入的数据
@Transient
protected Integer queryImport;

@Transient
protected List<WxCUserBasicInfoFilterDto> filterList;

public Integer getQueryImport() {
return queryImport;
}

public void setQueryImport(Integer queryImport) {
this.queryImport = queryImport;
}

public Long getId() {
return id;
}


+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxCUserBasicInfoMapper.java Просмотреть файл

@@ -33,4 +33,6 @@ public interface WxCUserBasicInfoMapper extends CommonMapper<WxCUserBasicInfo, S
List<WxCUserBasicInfoVo> findVoList(WxCUserBasicInfo wxCUserBasicInfo);

Integer countVoList(WxCUserBasicInfo wxCUserBasicInfo);


}

+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxCUserBasicInfoService.java Просмотреть файл

@@ -129,4 +129,6 @@ public interface WxCUserBasicInfoService {
* @param response
*/
void exportCarPayData(WxCarPayRecord record, HttpServletRequest request, HttpServletResponse response);

long findCountByFilter(WxCUserBasicInfoDto dto);
}

+ 4
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java Просмотреть файл

@@ -829,5 +829,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService {
excelService.exportExcel(list,null,sheetName,WxCarPayRecord.class,sheetName+".xls",response);
}


@Override
public long findCountByFilter(WxCUserBasicInfoDto dto) {
return wxCUserBasicInfoMapper.findCount(dto);
}
}

+ 15
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Просмотреть файл

@@ -397,12 +397,12 @@ public class WxFlowServiceImpl implements WxFlowService {
// 给审批人发送代办通知短信
List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstance.getId());
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();
}

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<>();
dynamicContentMap.put("userName",userName);
dynamicContentMap.put("page", Constant.adminPage);
@@ -476,6 +476,12 @@ public class WxFlowServiceImpl implements WxFlowService {
mailMsg.setModelId(EnumMailMsgModel.MAIL_ASSIGNEE_NODIFY.getCode());
mailMsg.setTo(new String[]{email});
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);
mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());
}
@@ -710,7 +716,7 @@ public class WxFlowServiceImpl implements WxFlowService {
String assignee = "";
List<MallUserInfo> mallUserInfoList = getUserByProcessInstanceId(processInstanceId);
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.setTo(new String[]{email});
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);
mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());
}


+ 3
- 0
mallinkService/src/main/resources/mapper/WxCUserBasicInfoMapper.xml Просмотреть файл

@@ -367,6 +367,9 @@
<if test=" null != phones">
and cu.phone in (${phones})
</if>
<if test="1 = queryImport">
and create_date like '%00:00:00'
</if>

<if test=" null != levelStartScore and (0 != levelStartScore and '' != levelStartScore)">
and cu.poins &gt;= #{levelStartScore}


Загрузка…
Отмена
Сохранить