Commit f2fcc919 authored by 黎聪聪's avatar 黎聪聪

2020年11月14日 13:13:04

parent 120cf7fa
......@@ -442,7 +442,7 @@
return;
}
var aadata = {
consultId: $('#id').val(),
id: $('#id').val(),
status: "2",
description: reason
};
......
......@@ -19,7 +19,7 @@ import java.util.List;
*/
public interface ConsultSheetMapper extends GenericDao<ConsultSheet> {
Integer updateDate(@Param("consultId") String consultId, @Param("status") String status, @Param("description") String description);
Integer updateDate(@Param("id") Long consultId, @Param("status") String status, @Param("description") String description);
Integer updateStatus(@Param("consultId") String consultId, @Param("status") String status);
......
......@@ -315,7 +315,7 @@
description = #{description}
</if>
</set>
where consult_id = #{consultId}
where id = #{id}
</update>
<update id="updateStatus">
......
......@@ -18,7 +18,7 @@ import java.util.List;
*/
public interface ConsultSheetService extends GenericService<ConsultSheet> {
Integer updateDate(String consultId, String status, String description);
Integer updateDate(Long id, String status, String description);
Integer updateStatus(String consultId, String status);
......
......@@ -84,10 +84,12 @@ public class ConsultSheetServiceImpl extends GenericServiceImpl<ConsultSheet> im
@Override
public Integer updateDate(String consultId, String status, String description) {
return consultSheetMapper.updateDate(consultId, status, description);
public Integer updateDate(Long id, String status, String description) {
return consultSheetMapper.updateDate(id, status, description);
}
@Override
public Integer updateStatus(String consultId, String status) {
return consultSheetMapper.updateStatus(consultId, status);
......
......@@ -134,27 +134,31 @@ public class ConsultSheetController {
//审核拒绝功能
@RequestMapping(value = "/updateData")
@ResponseBody
public JSONObject updateData(String consultId, String status, String description ,HttpServletRequest request) {
public JSONObject updateData(Long id, String status, String description ,HttpServletRequest request) {
JSONObject rtnJson = new JSONObject();
ConsultSheet consultSheet = consultSheetService.fetchById(Long.parseLong(consultId));
ConsultSheet consultSheet = consultSheetService.fetchById(id);
try {
if (!StringUtils.isEmpty(consultId) && !StringUtils.isEmpty(status) && !StringUtils.isEmpty(description)) {
Integer integer = consultSheetService.updateDate(consultId, status, description);
if (integer>0) {
if (id!=null && !StringUtils.isEmpty(status) && !StringUtils.isEmpty(description)) {
Integer integer = consultSheetService.updateDate(id, status, description);
if (integer<0) {
//发送审核通过模板消息
String appid = SystemConfig.p.getProperty("WX_MP_SERVER_APPID");
String refuseTmpId = SystemConfig.p.getProperty("CONSULT_SHEET_AUDIT_REFUSE_TEMPLATE_MSG");
String token = mpTokenUtil.getToken(mpAccountsService.getMpAccountsAppid(appid));
String first = "您好,您的咨询单审核通过。";
String remark = "不通过原由:{" + consultSheet.getDescription() + "};请点击详情重新填写咨询单。";
String first = "您好,您的咨询单审核通过。";
String remark = "不通过原由:{" + consultSheet.getDescription() + "};请点击详情重新填写咨询单。";
String [] keywords = {consultSheet.getUserName(),
consultSheet.getConsultId(),
DateFormatUtils.getDateFormat(consultSheet.getCreateTime(), "yyyy年MM月dd日")};
sendMessage(refuseTmpId, token, consultSheet.getOpenId(),first, remark, keywords, null);
}
if(integer>0){
rtnJson.put("errorNo", 0);
}
}
} catch (Exception e) {
//发送审核通过模板消息
......@@ -162,7 +166,7 @@ public class ConsultSheetController {
String refuseTmpId = SystemConfig.p.getProperty("CONSULT_SHEET_AUDIT_SUCCESS_TEMPLATE_MSG");
String token = mpTokenUtil.getToken(mpAccountsService.getMpAccountsAppid(appid));
String first = "您好,您提交的咨询单审核失败。";
String remark = "重新填写咨询单。";
String remark = "不通过原由:{" + consultSheet.getDescription() + "};请点击详情重新填写咨询单。";
String [] keywords = {consultSheet.getUserName(),
consultSheet.getConsultId(),
......
......@@ -164,7 +164,7 @@ public class MemberController {
Conds conds = new Conds();
conds.equal("m.del_flag", Constants.DEL_FLAG_0);
conds.equal("m.accounts_id", accountsId);
// if(member.getStatus().equals("1")){ //注册会员
// conds.isNull("m.status");
// }else if(member.getStatus().equals("2")){ //虚拟会员
......
......@@ -61,7 +61,7 @@
<section class="content-header">
<h1>
收货地址管理管理
收货地址管理
<small>收货地址管理</small>
</h1>
<ol class="breadcrumb">
......
......@@ -69,7 +69,7 @@
<section class="content-header">
<h1>
素材管理管理
素材管理
<small>素材管理</small>
</h1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment