Merge branch 'xzj' of gitee.com:darlk/ShengTangManage into develop

This commit is contained in:
huangdeliang
2021-08-04 17:52:34 +08:00
25 changed files with 949 additions and 34 deletions

View File

@ -10,6 +10,7 @@ import com.stdiet.common.utils.DateUtils;
import com.stdiet.common.utils.StringUtils;
import com.stdiet.common.utils.oss.AliyunOSSUtils;
import com.stdiet.common.utils.poi.ExcelUtil;
import com.stdiet.custom.domain.SysCustomer;
import com.stdiet.custom.domain.SysWxUserInfo;
import com.stdiet.custom.domain.SysWxUserLog;
import com.stdiet.custom.page.WxLogInfo;
@ -223,4 +224,16 @@ public class SysWxUserLogController extends BaseController {
}
return toAjax(row);
}
/**
* 查询指定日期未打卡用户
*/
@PreAuthorize("@ss.hasPermi('custom:wxUserLog:list')")
@GetMapping("/selectNotPunchCustomerByDate")
public TableDataInfo selectNotPunchCustomerByDate(SysCustomer sysCustomer) {
startPage();
List<SysCustomer> list = sysWxUserLogService.selectNotPunchCustomerByDate(sysCustomer);
return getDataTable(list);
}
}

View File

@ -754,6 +754,10 @@ public class WechatAppletController extends BaseController {
sysPunchThumbsup.setPunchId(Long.parseLong(AesUtils.decrypt(sysPunchThumbsup.getEncPunchId())));
rows = sysPunchThumbsupService.insertSysPunchThumbsup(sysPunchThumbsup);
if (rows > 0) {
//发送点赞消息
SysWxUserLog sysWxUserLog = sysWxUserLogService.selectSysWxUserLogById(sysPunchThumbsup.getPunchId()+"");
sysMessageNoticeService.sendpunchDynamicThumbsUpMessage(sysWxUserLog, sysPunchThumbsup.getCusOpenid());
Map<String, Object> resultData = new HashMap<>();
resultData.put("id", AesUtils.encrypt(String.valueOf(sysPunchThumbsup.getId())));
resultData.put("openid", sysPunchThumbsup.getCusOpenid());
@ -904,6 +908,41 @@ public class WechatAppletController extends BaseController {
return AjaxResult.success(reply);
}
/**
* 查询消息列表
* @param cusId 客户ID
* @param messageType 0 查询全部 1 查询打卡点评消息 2 打卡动态点赞消息 3 服务消息(食谱更新、执行反馈消息)
* @return
*/
@GetMapping("/getMessageNoticeData")
public AjaxResult getMessageNoticeList(@RequestParam("cusId")String cusId, @RequestParam(value = "messageType", required = false, defaultValue = "0")Integer messageType) {
cusId = StringUtils.isNotEmpty(cusId) ? AesUtils.decrypt(cusId) : "0";
Map<String, Object> result = new HashMap<>();
//查询打卡消息
if(messageType.intValue() == 0 || messageType.intValue() == 1){
startPage();
Map<String,Object> punchResult = sysMessageNoticeService.getPunchCommentMessageByCusId(Long.parseLong(cusId));
List<Map<String,Object>> list = (List<Map<String,Object>>)punchResult.get("data");
punchResult.put("data",getDataTable(list));
result.put("punchMessageData", punchResult);
}
if(messageType.intValue() == 0 || messageType.intValue() == 2){
startPage();
Map<String,Object> thumbsUpResult = sysMessageNoticeService.getPunchDynamicThumbsUpMessage(Long.parseLong(cusId));
List<Map<String,Object>> list = (List<Map<String,Object>>)thumbsUpResult.get("data");
thumbsUpResult.put("data",getDataTable(list));
result.put("thumbsUpMessageData", thumbsUpResult);
}
if(messageType.intValue() == 0 || messageType.intValue() == 3){
startPage();
Map<String,Object> serviceResult = sysMessageNoticeService.getServiceMessage(Long.parseLong(cusId));
List<Map<String,Object>> list = (List<Map<String,Object>>)serviceResult.get("data");
serviceResult.put("data",getDataTable(list));
result.put("serviceMessageData", serviceResult);
}
return AjaxResult.success(result);
}
}