From 2b4551777f29bd5639f403850f9a443d1366579c Mon Sep 17 00:00:00 2001
From: liaoxuwei <5789413@qq.com>
Date: Sat, 2 Jul 2022 11:22:56 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E5=8F=B0=E4=B8=AA=E4=BA=BA=E4=B8=AD?=
 =?UTF-8?q?=E5=BF=83=EF=BC=8C=E4=B8=AA=E4=BA=BA=E4=BF=A1=E6=81=AF=E4=BF=AE?=
 =?UTF-8?q?=E6=94=B9=EF=BC=8C=E5=AF=86=E7=A0=81=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 eas-manager/doc/api.md                        | 158 +++++++++++++++++-
 .../module/customer/model/vo/CustomerVo.java  |   3 +
 .../model/vo/CustomerWorkCollectVo.java       |   6 +-
 .../customer/service/CustomerService.java     |  19 +++
 .../service/impl/CustomerServiceImpl.java     |  54 ++++++
 .../impl/CustomerWorkCollectServiceImpl.java  |  16 +-
 .../customer/web/CustomerController.java      | 116 ++++++++++++-
 .../web/CustomerWorkCollectController.java    |   8 +-
 8 files changed, 360 insertions(+), 20 deletions(-)

diff --git a/eas-manager/doc/api.md b/eas-manager/doc/api.md
index 801cfeb..902a077 100644
--- a/eas-manager/doc/api.md
+++ b/eas-manager/doc/api.md
@@ -4643,6 +4643,7 @@ data|object|鏁版嵁瀵硅薄
 &emsp;&emsp;customerId|Long|瀹㈡埛ID
 &emsp;&emsp;masterplateId|Long|妯$増ID
 &emsp;&emsp;createTime|Date|鏀惰棌鏃堕棿
+&emsp;&emsp;designMasterplate|object|妯℃澘瀵硅薄
 dict|object|瀛楀吀瀵硅薄
 
 **鍝嶅簲娑堟伅鏍蜂緥:**
@@ -4774,9 +4775,9 @@ msg|String|娑堟伅|-
 
 ```
 
-### 涓汉淇℃伅
+### 涓汉涓績
 
-**璇锋眰URL:** customer/info
+**璇锋眰URL:** customer/personal
 
 **璇锋眰鏂瑰紡:** GET
 
@@ -4784,15 +4785,9 @@ msg|String|娑堟伅|-
 
 **绠€瑕佹弿杩�:** 鏌ョ湅瀹㈡埛绠$悊锛岃繑鍥炲疄渚嬭缁嗕俊鎭�
 
-**璇锋眰鍙傛暟:**
-
-鍙傛暟鍚嶇О|绫诲瀷|蹇呭~|鎻忚堪
-:---|:---|:---|:------
-id|Long|鏄瘄ID
-
 **璇锋眰鏍蜂緥:**
 ```
-    http://localhost/customer/info?id=549
+    http://localhost/customer/personal
 ```
 **鍝嶅簲鍙傛暟:**
 
@@ -4813,6 +4808,7 @@ data|object|鏁版嵁瀵硅薄
 &emsp;sex|Integer|鎬у埆
 &emsp;mailbox|String|閭
 &emsp;job|String|鑱屼綅
+&emsp;avatar|String|澶村儚鍥剧墖鍦板潃
 &emsp;customerSrc|Long|瀹㈡埛鏉ユ簮
 &emsp;status|Integer|浣跨敤鐘舵€侊紝1:姝e父锛�0:绂佺敤锛岄粯璁わ細0
 &emsp;createUserId|Long|鍒涘缓鐢ㄦ埛
@@ -4850,6 +4846,150 @@ dict|object|瀛楀吀瀵硅薄
 }
 ```
 
+### 淇敼涓汉淇℃伅
+
+**璇锋眰URL:** customer/personal/update
+
+**璇锋眰鏂瑰紡:** POST
+
+**鍐呭绫诲瀷:** application/json;charset=utf-8
+
+**绠€瑕佹弿杩�:** 淇濆瓨鎴栨洿鏂板鎴风鐞嗭細id涓虹┖鏃朵负鏂板淇濆瓨锛屽惁鍒欎负鏇存柊鎻愪氦
+
+**璇锋眰鍙傛暟:**
+
+鍙傛暟鍚嶇О|绫诲瀷|蹇呭~|鎻忚堪
+:---|:---|:---|:-------
+loginName|String|鏄瘄鐢ㄦ埛鐧诲綍璐﹀彿
+custName|String|鏄瘄瀹㈡埛鐪熷疄鍚嶇О
+organization|String|鏄瘄鍗曚綅鍚嶇О
+contactTelphone|String|鏄瘄鑱旂郴鐢佃瘽
+sex|Integer|鏄瘄鎬у埆
+mailbox|String|鏄瘄閭
+job|String|鏄瘄鑱屼綅
+avatarString|鏄瘄澶村儚鍥剧墖鍦板潃
+
+**璇锋眰鏍蜂緥:**
+```
+{
+    "loginName":"6q0z8f",
+    "custName":"r7s2ru",
+    "organization":"074b9m",
+    "contactTelphone":"s11ai2",
+    "sex":5045,
+    "mailbox":"okie88",
+    "job":"sup79w",
+    "avatar":"sup79w"
+}
+
+```
+**鍝嶅簲鍙傛暟:**
+
+鍙傛暟鍚嶇О |鍙傛暟绫诲瀷|鎻忚堪
+:---|:---|:------
+code|Integer|缁撴灉鐮侊紙-1.澶辫触锛�1.鎴愬姛锛�
+msg|String|娑堟伅
+data|object|鏁版嵁瀵硅薄
+&emsp;id|Long|淇濆瓨鍚庝富閿甶d
+&emsp;entity|object|淇濆瓨鏇存柊瀹炰綋
+&emsp;&emsp;id|Long|涓婚敭ID锛屼富閿紝鑷闀�
+&emsp;&emsp;loginName|String|鐢ㄦ埛鐧诲綍璐﹀彿
+&emsp;&emsp;password|String|瀵嗙爜
+&emsp;&emsp;memberLevel|Integer|浼氬憳绛夌骇锛岋紝0锛氭湭寮€鍚紝1锛氳瘯鐢ㄥ鎴凤紝2锛歏IP锛�3锛氳璁″笀锛岄粯璁�0
+&emsp;&emsp;custName|String|瀹㈡埛鐪熷疄鍚嶇О
+&emsp;&emsp;organization|String|鍗曚綅鍚嶇О
+&emsp;&emsp;contactTelphone|String|鑱旂郴鐢佃瘽
+&emsp;&emsp;enterpriseConsultant|String|浼佷笟椤鹃棶
+&emsp;&emsp;siteId|Long|绔欑偣ID
+&emsp;&emsp;sex|Integer|鎬у埆
+&emsp;&emsp;mailbox|String|閭
+&emsp;&emsp;job|String|鑱屼綅
+&emsp;&emsp;avatar|String|澶村儚鍥剧墖鍦板潃
+&emsp;&emsp;customerSrc|Long|瀹㈡埛鏉ユ簮
+&emsp;&emsp;status|Integer|浣跨敤鐘舵€侊紝1:姝e父锛�0:绂佺敤锛岄粯璁わ細0
+&emsp;&emsp;createUserId|Long|鍒涘缓鐢ㄦ埛
+&emsp;&emsp;createTime|Date|娉ㄥ唽鏃堕棿
+&emsp;&emsp;updateTime|Date|鏇存柊鏃堕棿
+&emsp;&emsp;lastLoginTime|Date|鏈€鍚庝竴娆$櫥褰曟椂闂�
+&emsp;&emsp;lastLoginAddress|String|鏈€鍚庝竴娆$櫥褰曞湴鍧€
+
+**鍝嶅簲娑堟伅鏍蜂緥:**
+```
+{
+    "msg":"鏂板妯″潡鎴愬姛",
+    "code":1,
+    "data":{}
+    }
+}
+
+```
+
+### 淇敼涓汉瀵嗙爜
+
+**璇锋眰URL:** customer/personal/change/password
+
+**璇锋眰鏂瑰紡:** POST
+
+**鍐呭绫诲瀷:** application/json;charset=utf-8
+
+**绠€瑕佹弿杩�:** 淇濆瓨鎴栨洿鏂板鎴风鐞嗭細id涓虹┖鏃朵负鏂板淇濆瓨锛屽惁鍒欎负鏇存柊鎻愪氦
+
+**璇锋眰鍙傛暟:**
+
+鍙傛暟鍚嶇О|绫诲瀷|蹇呭~|鎻忚堪
+:---|:---|:---|:-------
+oldPassword|String|鏄瘄鏃у瘑鐮�
+newPassword|String|鏄瘄鏂板瘑鐮�
+
+**璇锋眰鏍蜂緥:**
+```
+{
+    "oldPassword":"6q0z8f",
+    "newPassword":"r7s2ru"
+}
+
+```
+**鍝嶅簲鍙傛暟:**
+
+鍙傛暟鍚嶇О |鍙傛暟绫诲瀷|鎻忚堪
+:---|:---|:------
+code|Integer|缁撴灉鐮侊紙-1.澶辫触锛�1.鎴愬姛锛�
+msg|String|娑堟伅
+data|object|鏁版嵁瀵硅薄
+&emsp;id|Long|淇濆瓨鍚庝富閿甶d
+&emsp;entity|object|淇濆瓨鏇存柊瀹炰綋
+&emsp;&emsp;id|Long|涓婚敭ID锛屼富閿紝鑷闀�
+&emsp;&emsp;loginName|String|鐢ㄦ埛鐧诲綍璐﹀彿
+&emsp;&emsp;password|String|瀵嗙爜
+&emsp;&emsp;memberLevel|Integer|浼氬憳绛夌骇锛岋紝0锛氭湭寮€鍚紝1锛氳瘯鐢ㄥ鎴凤紝2锛歏IP锛�3锛氳璁″笀锛岄粯璁�0
+&emsp;&emsp;custName|String|瀹㈡埛鐪熷疄鍚嶇О
+&emsp;&emsp;organization|String|鍗曚綅鍚嶇О
+&emsp;&emsp;contactTelphone|String|鑱旂郴鐢佃瘽
+&emsp;&emsp;enterpriseConsultant|String|浼佷笟椤鹃棶
+&emsp;&emsp;siteId|Long|绔欑偣ID
+&emsp;&emsp;sex|Integer|鎬у埆
+&emsp;&emsp;mailbox|String|閭
+&emsp;&emsp;job|String|鑱屼綅
+&emsp;&emsp;avatar|String|澶村儚鍥剧墖鍦板潃
+&emsp;&emsp;customerSrc|Long|瀹㈡埛鏉ユ簮
+&emsp;&emsp;status|Integer|浣跨敤鐘舵€侊紝1:姝e父锛�0:绂佺敤锛岄粯璁わ細0
+&emsp;&emsp;createUserId|Long|鍒涘缓鐢ㄦ埛
+&emsp;&emsp;createTime|Date|娉ㄥ唽鏃堕棿
+&emsp;&emsp;updateTime|Date|鏇存柊鏃堕棿
+&emsp;&emsp;lastLoginTime|Date|鏈€鍚庝竴娆$櫥褰曟椂闂�
+&emsp;&emsp;lastLoginAddress|String|鏈€鍚庝竴娆$櫥褰曞湴鍧€
+
+**鍝嶅簲娑堟伅鏍蜂緥:**
+```
+{
+    "msg":"鏂板妯″潡鎴愬姛",
+    "code":1,
+    "data":{}
+    }
+}
+
+```
+
 ### 妯℃澘涓績
 
 **璇锋眰URL:** design/masterplate/list
diff --git a/eas-manager/src/main/java/com/mortals/xhx/module/customer/model/vo/CustomerVo.java b/eas-manager/src/main/java/com/mortals/xhx/module/customer/model/vo/CustomerVo.java
index f5dd35d..dfa8851 100644
--- a/eas-manager/src/main/java/com/mortals/xhx/module/customer/model/vo/CustomerVo.java
+++ b/eas-manager/src/main/java/com/mortals/xhx/module/customer/model/vo/CustomerVo.java
@@ -35,4 +35,7 @@ public class CustomerVo extends BaseEntityLong {
     private String query;
     /** 绔欑偣缂栫爜 */
     private String siteCode="";
+
+    private String oldPassword;
+    private String newPassword;
 }
\ No newline at end of file
diff --git a/eas-manager/src/main/java/com/mortals/xhx/module/customer/model/vo/CustomerWorkCollectVo.java b/eas-manager/src/main/java/com/mortals/xhx/module/customer/model/vo/CustomerWorkCollectVo.java
index cf183d5..5c2550d 100644
--- a/eas-manager/src/main/java/com/mortals/xhx/module/customer/model/vo/CustomerWorkCollectVo.java
+++ b/eas-manager/src/main/java/com/mortals/xhx/module/customer/model/vo/CustomerWorkCollectVo.java
@@ -1,6 +1,7 @@
 package com.mortals.xhx.module.customer.model.vo;
 import com.mortals.framework.model.BaseEntityLong;
 import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
+import com.mortals.xhx.module.design.model.DesignMasterplateEntity;
 import lombok.Data;
 
 import java.util.ArrayList;
@@ -13,5 +14,8 @@ import java.util.List;
 */
 @Data
 public class CustomerWorkCollectVo extends BaseEntityLong {
-
+    /**
+     * 妯℃澘淇℃伅
+     */
+    private DesignMasterplateEntity designMasterplate;
 }
\ No newline at end of file
diff --git a/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/CustomerService.java b/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/CustomerService.java
index ffdd5db..2be149f 100644
--- a/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/CustomerService.java
+++ b/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/CustomerService.java
@@ -30,4 +30,23 @@ public interface CustomerService extends ICRUDService<CustomerEntity,Long>{
      */
     CustomerEntity doLogin(String loginName, String password, String loginIp) throws AppException;
 
+
+    /**
+     * 鐢ㄦ埛淇敼涓汉淇℃伅
+     * @param params
+     * @param context
+     * @return
+     * @throws AppException
+     */
+    CustomerEntity updateByPersonal(CustomerEntity params, Context context) throws AppException;
+
+    /**
+     * 鐢ㄦ埛淇敼涓汉瀵嗙爜
+     * @param params
+     * @param context
+     * @return
+     * @throws AppException
+     */
+    CustomerEntity changePassword(CustomerEntity params, Context context) throws AppException;
+
 }
\ No newline at end of file
diff --git a/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerServiceImpl.java b/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerServiceImpl.java
index baff8eb..cbd4f0e 100644
--- a/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerServiceImpl.java
+++ b/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerServiceImpl.java
@@ -9,6 +9,7 @@ import com.mortals.framework.util.StringUtils;
 import com.mortals.xhx.module.customer.model.CustomerEntityExt;
 import com.mortals.xhx.module.customer.model.CustomerQuery;
 import org.apache.commons.collections4.CollectionUtils;
+import org.checkerframework.checker.units.qual.C;
 import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
@@ -100,4 +101,57 @@ public class CustomerServiceImpl extends AbstractCRUDServiceImpl<CustomerDao, Cu
         params.setLoginName(loginName);
         return this.selectOne(params);
     }
+
+    @Override
+    public CustomerEntity updateByPersonal(CustomerEntity params, Context context) throws AppException {
+        CustomerEntity update = new CustomerEntity();
+        update.setId(params.getId());
+        update.setLoginName(params.getLoginName());
+        update.setCustName(params.getCustName());
+        update.setAvatar(params.getAvatar());
+        update.setSex(params.getSex());
+        update.setOrganization(params.getOrganization());
+        update.setContactTelphone(params.getContactTelphone());
+        update.setMailbox(params.getMailbox());
+        update.setJob(params.getJob());
+        int iRet = this.dao.update(update);
+        if (iRet == 0) {
+            throw new AppException(-1002, "鏇存柊澶辫触锛�");
+        } else {
+            params.setPassword(null);
+            return params;
+        }
+    }
+
+    @Override
+    public CustomerEntity changePassword(CustomerEntity params, Context context) throws AppException {
+        if(StringUtils.isEmpty(params.getOldPassword())||StringUtils.isEmpty(params.getNewPassword())){
+            throw new AppException("瀵嗙爜涓嶈兘涓虹┖");
+        }
+        if(params.getOldPassword().equals(params.getNewPassword())){
+            throw new AppException("鏂板瘑鐮佷笉鑳戒笌鏃у瘑鐮佷竴鑷�");
+        }
+        CustomerEntity old = this.get(params.getId());
+        if(old==null){
+            throw new AppException("瀹㈡埛淇℃伅涓嶅瓨鍦�");
+        }
+        String newPwd = "";
+        String oldPwd = "";
+        try {
+            oldPwd = SecurityUtil.md5DoubleEncoding(params.getOldPassword());
+            newPwd = SecurityUtil.md5DoubleEncoding(params.getNewPassword());
+        }catch (Exception e) {
+            throw new AppException("瀵嗙爜杞崲寮傚父");
+        }
+        if(old.getPassword().equals(oldPwd)){
+            CustomerEntity update = new CustomerEntity();
+            update.setId(params.getId());
+            update.setPassword(newPwd);
+            this.update(update,context);
+            old.setPassword(null);
+        }else {
+            throw new AppException("鍘熸潵鐨勫瘑鐮佷笉姝g‘");
+        }
+        return old;
+    }
 }
\ No newline at end of file
diff --git a/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkCollectServiceImpl.java b/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkCollectServiceImpl.java
index 57cf031..f06af82 100644
--- a/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkCollectServiceImpl.java
+++ b/eas-manager/src/main/java/com/mortals/xhx/module/customer/service/impl/CustomerWorkCollectServiceImpl.java
@@ -8,6 +8,8 @@ import com.mortals.xhx.module.customer.dao.CustomerWorkCollectDao;
 import com.mortals.xhx.module.customer.model.CustomerWorkCollectEntity;
 import com.mortals.xhx.module.customer.model.CustomerWorkDesignEntity;
 import com.mortals.xhx.module.customer.service.CustomerWorkCollectService;
+import com.mortals.xhx.module.design.model.DesignMasterplateEntity;
+import com.mortals.xhx.module.design.service.DesignMasterplateService;
 import com.mortals.xhx.module.masterplate.model.MasterplateUseInfoEntity;
 import com.mortals.xhx.module.masterplate.service.MasterplateUseInfoService;
 import org.apache.commons.collections4.CollectionUtils;
@@ -26,13 +28,25 @@ import java.util.List;
 @Service("customerWorkCollectService")
 public class CustomerWorkCollectServiceImpl extends AbstractCRUDServiceImpl<CustomerWorkCollectDao, CustomerWorkCollectEntity, Long> implements CustomerWorkCollectService {
 
+    @Autowired
+    private DesignMasterplateService designMasterplateService;
+
     @Override
     protected CustomerWorkCollectEntity findBefore(CustomerWorkCollectEntity params, PageInfo pageInfo, Context context) throws AppException {
         pageInfo.setPrePageResult(-1);
-
         return super.findBefore(params, pageInfo, context);
     }
 
+    @Override
+    protected void findAfter(CustomerWorkCollectEntity params, PageInfo pageInfo, Context context, List<CustomerWorkCollectEntity> list) throws AppException {
+        if(CollectionUtils.isNotEmpty(list)){
+            list.stream().forEach(item->{
+                DesignMasterplateEntity designMasterplateEntity = designMasterplateService.get(item.getMasterplateId());
+                item.setDesignMasterplate(designMasterplateEntity!=null?designMasterplateEntity:null);
+            });
+        }
+    }
+
     @Override
     protected void saveBefore(CustomerWorkCollectEntity entity, Context context) throws AppException {
         this.validData(entity, context);
diff --git a/eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerController.java b/eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerController.java
index 4dd68b7..90615c0 100644
--- a/eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerController.java
+++ b/eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerController.java
@@ -7,19 +7,18 @@ import com.mortals.framework.exception.AppException;
 import com.mortals.framework.model.Context;
 import com.mortals.framework.model.PageInfo;
 import com.mortals.framework.model.Result;
+import com.mortals.framework.service.IUser;
 import com.mortals.framework.util.StringUtils;
 import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
 import com.mortals.xhx.common.code.CustomerSatusEnum;
 import com.mortals.xhx.common.code.CustomerSrcEnum;
 import com.mortals.xhx.common.code.MemberLevelEnum;
 import com.mortals.xhx.common.code.SexEnum;
+import com.mortals.xhx.common.key.Constant;
 import com.mortals.xhx.module.customer.model.CustomerEntity;
 import com.mortals.xhx.module.customer.model.CustomerQuery;
 import com.mortals.xhx.module.customer.service.CustomerService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.*;
 /**
@@ -154,4 +153,113 @@ public class CustomerController extends BaseCRUDJsonBodyMappingController<Custom
         return 1;
     }
 
+    @RequestMapping(value = {"personal"},method = {RequestMethod.POST, RequestMethod.GET})
+    public String personal() {
+        Map<String, Object> model = new HashMap();
+        if(this.getCurUser()==null||this.getCurUser().getUserType()!= Constant.CUSTOMER_USER){
+            return this.createFailJsonResp("璇峰厛鐧诲綍");
+        } else {
+            JSONObject ret = new JSONObject();
+            String busiDesc = "鐢ㄦ埛鏌ョ湅涓汉淇℃伅";
+            Context context = this.getContext();
+            try {
+                CustomerEntity entity = this.service.get(this.getCurUser().getId(), context);
+                if (entity == null) {
+                    throw new Exception(busiDesc + "锛屼笉瀛樺湪鎴栧凡琚垹闄�");
+                }
+                entity.setPassword(null);
+                ret.put("data", entity);
+                this.recordSysLog(this.request, busiDesc + " 銆愭垚鍔熴€�");
+            } catch (Exception var8) {
+                this.doException(this.request, busiDesc, model, var8);
+                Object msg = model.get("message_info");
+                return this.createFailJsonResp(msg == null ? "绯荤粺寮傚父" : msg.toString());
+            }
+
+            this.init(model, context);
+            ret.put("code", 1);
+            ret.put("msg", model.remove("message_info"));
+            ret.put("dict", model.remove("dict"));
+            return ret.toJSONString();
+        }
+    }
+
+    @RequestMapping(value = {"personal/update"},method = {RequestMethod.POST})
+    public String updateByPersonal(@RequestBody CustomerEntity entity) {
+        Map<String, Object> model = new HashMap();
+        Context context = this.getContext();
+        IUser user = this.getCurUser();
+        if(user == null||this.getCurUser().getUserType()!= Constant.CUSTOMER_USER){
+            return this.createFailJsonResp("璇峰厛鐧诲綍");
+        }
+        String busiDesc = "瀹㈡埛淇敼瀵嗙爜";
+        int code = 1;
+        try {
+            entity.setUpdateTime(new Date());
+            entity.setId(user.getId());
+            entity.setUpdateUserId(user.getId());
+            entity.setUpdateUser(user.getLoginName());
+            entity.setUpdateUserName(user.getRealName());
+            entity.setUpdateUserDeptId(user.getDeptId());
+            entity.setUpdateUserDeptName(user.getDeptName());
+            this.service.updateByPersonal(entity, context);
+            model.put("id", entity.getId());
+            code = this.saveAfter(entity, model, context);
+            model.put("entity", entity);
+            model.put("message_info", busiDesc + "鎴愬姛");
+            this.recordSysLog(this.request, busiDesc + " 銆愭垚鍔熴€� [id:" + entity.getId() + "]");
+        } catch (Exception var7) {
+            this.doException(this.request, busiDesc, model, var7);
+            model.put("entity", entity);
+            this.init(model, context);
+            code = this.saveException(entity, model, context, var7);
+        }
+
+        this.init(model, context);
+        JSONObject ret = new JSONObject();
+        ret.put("code", code);
+        ret.put("msg", model.remove("message_info"));
+        ret.put("data", model);
+        return ret.toJSONString();
+    }
+
+    @RequestMapping(value = {"personal/change/password"},method = {RequestMethod.POST})
+    public String changePassword(@RequestBody CustomerEntity entity) {
+        Map<String, Object> model = new HashMap();
+        Context context = this.getContext();
+        IUser user = this.getCurUser();
+        if(user == null||this.getCurUser().getUserType()!= Constant.CUSTOMER_USER){
+            return this.createFailJsonResp("璇峰厛鐧诲綍");
+        }
+        String busiDesc = "瀹㈡埛淇敼瀵嗙爜";
+        int code = 1;
+        try {
+            entity.setUpdateTime(new Date());
+            entity.setId(user.getId());
+            entity.setUpdateUserId(user.getId());
+            entity.setUpdateUser(user.getLoginName());
+            entity.setUpdateUserName(user.getRealName());
+            entity.setUpdateUserDeptId(user.getDeptId());
+            entity.setUpdateUserDeptName(user.getDeptName());
+            this.service.changePassword(entity, context);
+            model.put("id", entity.getId());
+            code = this.saveAfter(entity, model, context);
+            model.put("entity", entity);
+            model.put("message_info", busiDesc + "鎴愬姛");
+            this.recordSysLog(this.request, busiDesc + " 銆愭垚鍔熴€� [id:" + entity.getId() + "]");
+        } catch (Exception var7) {
+            this.doException(this.request, busiDesc, model, var7);
+            model.put("entity", entity);
+            this.init(model, context);
+            code = this.saveException(entity, model, context, var7);
+        }
+
+        this.init(model, context);
+        JSONObject ret = new JSONObject();
+        ret.put("code", code);
+        ret.put("msg", model.remove("message_info"));
+        ret.put("data", model);
+        return ret.toJSONString();
+    }
+
 }
\ No newline at end of file
diff --git a/eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerWorkCollectController.java b/eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerWorkCollectController.java
index ddfc105..281976b 100644
--- a/eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerWorkCollectController.java
+++ b/eas-manager/src/main/java/com/mortals/xhx/module/customer/web/CustomerWorkCollectController.java
@@ -1,12 +1,12 @@
 package com.mortals.xhx.module.customer.web;
 import com.mortals.framework.exception.AppException;
 import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
-import com.mortals.xhx.base.system.param.service.ParamService;
 import com.mortals.xhx.common.key.Constant;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.bind.annotation.*;
 import com.mortals.framework.model.Context;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -23,6 +23,7 @@ import java.util.stream.Collectors;
 import com.alibaba.fastjson.JSONObject;
 import java.util.Arrays;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 import static com.mortals.framework.ap.SysConstains.*;
 /**
@@ -36,9 +37,6 @@ import static com.mortals.framework.ap.SysConstains.*;
 @RequestMapping("customer/work/collect")
 public class CustomerWorkCollectController extends BaseCRUDJsonBodyMappingController<CustomerWorkCollectService,CustomerWorkCollectEntity,Long> {
 
-    @Autowired
-    private ParamService paramService;
-
     public CustomerWorkCollectController(){
         super.setModuleDesc( "瀹㈡埛鏀惰棌淇℃伅");
     }
-- 
2.24.3