chao 3 vuotta sitten
vanhempi
commit
325c6feebf
30 muutettua tiedostoa jossa 956 lisäystä ja 50 poistoa
  1. 52 0
      src/main/java/com/caimei/www/controller/unlimitedApi/RepairApi.java
  2. 33 0
      src/main/java/com/caimei/www/mapper/RepairDao.java
  3. 112 0
      src/main/java/com/caimei/www/pojo/link/PageVo.java
  4. 34 0
      src/main/java/com/caimei/www/pojo/link/RepairLinkVo.java
  5. 35 0
      src/main/java/com/caimei/www/pojo/link/RepairUserVo.java
  6. 189 0
      src/main/java/com/caimei/www/pojo/link/RepairVo.java
  7. 41 0
      src/main/java/com/caimei/www/service/link/RepairService.java
  8. 223 0
      src/main/java/com/caimei/www/service/link/impl/RepairServiceImpl.java
  9. 184 0
      src/main/resources/mapper/RepairMapper.xml
  10. 2 2
      src/main/resources/static/js/account/register-club.js
  11. 2 2
      src/main/resources/static/js/account/register-supplier.js
  12. 2 2
      src/main/resources/static/js/account/supplier-information.js
  13. 1 1
      src/main/resources/static/js/common/ajax.service.js
  14. 4 4
      src/main/resources/static/js/common/serviceapi/repair.service.js
  15. 9 6
      src/main/resources/static/js/common/serviceapi/utils.service.js
  16. 1 1
      src/main/resources/static/js/flea-market/form.js
  17. 1 1
      src/main/resources/static/js/supplier-center/setting/information.js
  18. 2 2
      src/main/resources/static/js/user-center/repair/form-user.js
  19. 1 1
      src/main/resources/static/js/user-center/repair/repair.js
  20. 2 2
      src/main/resources/static/js/user-center/setting/information.js
  21. 3 3
      src/main/resources/static/js/user-center/setting/upgrade.js
  22. 3 3
      src/main/resources/templates/account/register-club.html
  23. 3 3
      src/main/resources/templates/account/register-supplier.html
  24. 3 3
      src/main/resources/templates/account/supplier-information.html
  25. 2 2
      src/main/resources/templates/flea-market/form.html
  26. 2 2
      src/main/resources/templates/supplier-center/setting/information.html
  27. 3 3
      src/main/resources/templates/user-center/repair/form-user.html
  28. 2 2
      src/main/resources/templates/user-center/repair/form.html
  29. 3 3
      src/main/resources/templates/user-center/setting/information.html
  30. 2 2
      src/main/resources/templates/user-center/setting/upgrade.html

+ 52 - 0
src/main/java/com/caimei/www/controller/unlimitedApi/RepairApi.java

@@ -1,5 +1,13 @@
 package com.caimei.www.controller.unlimitedApi;
 
+import com.caimei.www.pojo.JsonModel;
+import com.caimei.www.pojo.link.PageVo;
+import com.caimei.www.pojo.link.RepairVo;
+import com.caimei.www.service.link.RepairService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
@@ -9,6 +17,50 @@ import org.springframework.web.bind.annotation.RestController;
  * @date : 2021/10/20
  */
 @RestController
+@RequestMapping("/repair")
 public class RepairApi {
 
+    private RepairService repairService;
+    @Autowired
+    public void setRepairService(RepairService repairService) {
+        this.repairService = repairService;
+    }
+
+    /**
+     * 维修列表 (旧:/pcCenter/findMaintenance)
+     */
+    @GetMapping("/list")
+    public JsonModel findMaintenance(RepairVo repairVo, PageVo pageVo) {
+        return repairService.findMaintenance(repairVo, pageVo);
+    }
+
+    /**
+     * 申请维修 (旧:/pcCenter/applyMaintenance)
+     */
+    @PostMapping("/apply")
+    public JsonModel applyMaintenance(RepairVo repairVo) {
+        return repairService.applyMaintenance(repairVo);
+    }
+
+    /**
+     * 维修详情 (旧:/pcCenter/maintenance/detail)
+     * id 维修id
+     */
+    @GetMapping("/detail")
+    public JsonModel maintenanceDetail(Integer id) {
+        return repairService.findMaintenanceDetail(id);
+    }
+
+    /**
+     * 评价维修  (旧:/pcCenter/maintenance/evaluation)
+     * @param solveStatus    是否解决问题:0未解决,1已解决
+     * @param serviceRating  服务评分,一颗心表示1,多颗数次之
+     * @param serviceEvaluate  服务评价
+     */
+    @PostMapping("/evaluation")
+    public JsonModel evaluationMaintenance(Integer id, String solveStatus, String serviceRating, String serviceEvaluate){
+        return repairService.evaluationMaintenance(id, solveStatus, serviceRating, serviceEvaluate);
+
+    }
+
 }

+ 33 - 0
src/main/java/com/caimei/www/mapper/RepairDao.java

@@ -0,0 +1,33 @@
+package com.caimei.www.mapper;
+
+import com.caimei.www.pojo.link.RepairLinkVo;
+import com.caimei.www.pojo.link.RepairUserVo;
+import com.caimei.www.pojo.link.RepairVo;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2021/10/20
+ */
+@Mapper
+public interface RepairDao {
+    List<RepairVo> findMaintenance(RepairVo repairVo);
+
+    RepairUserVo getRepairUser(Integer userId);
+
+    String findOrderNoInToday(String date);
+
+    void insertMaintenance(RepairVo repairVo);
+
+    void insertMaintenanceLink(RepairLinkVo userLink);
+
+    RepairVo findMaintenanceDetail(Integer id);
+
+    int checkMobileSubmitTime(String mobile, String date);
+
+    void updateMaintenace(RepairVo repairVo);
+}

+ 112 - 0
src/main/java/com/caimei/www/pojo/link/PageVo.java

@@ -0,0 +1,112 @@
+package com.caimei.www.pojo.link;
+
+import lombok.Builder;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2020/3/9
+ */
+@Data
+public class PageVo<T> implements Serializable {
+    /** 当前页码 */
+    @Builder.Default
+    private int pageNum = 1;
+    /** 每页大小 */
+    @Builder.Default
+    private int pageSize = 10;
+    /** 总记录数 */
+    private int totalRecord;
+    /** 总页数 */
+    private int totalPage;
+    /** 是否有后一页 */
+    private boolean hasNextPage;
+    /** 是否有前一页 */
+    private boolean hasPreviousPage;
+    /** 查询结果 */
+    List<T> results;
+
+    public PageVo(List<T> list) {
+        if (list instanceof com.github.pagehelper.Page) {
+            com.github.pagehelper.Page<T> page = (com.github.pagehelper.Page<T>) list;
+            this.pageNum = page.getPageNum();
+            this.pageSize = page.getPageSize();
+            this.totalRecord = (int) page.getTotal();
+            this.totalPage = page.getPages();
+            setHasPreviousAndNext();
+            this.results = page;
+        } else if (list != null) {
+            this.pageSize = list.size();
+            this.totalRecord = list.size();
+            this.totalPage = 1;
+            this.results = list;
+        }
+    }
+
+    public PageVo(int pageNum, int pageSize, int totalRecord, List<T> results) {
+        super();
+        this.pageNum = pageNum;
+        this.pageSize = pageSize;
+        this.totalRecord = totalRecord;
+        this.totalPage = totalRecord % pageSize == 0 ? totalRecord / pageSize : totalRecord / pageSize + 1;
+        this.results = results;
+        if (this.pageNum < 2) {
+            hasPreviousPage = false;
+        } else {
+            hasPreviousPage = true;
+        }
+        if (this.pageNum < totalPage) {
+            hasNextPage = true;
+        } else {
+            hasNextPage = false;
+        }
+    }
+
+    public PageVo(int pageNum, int maxSize, int totalRecord, int totalPage,
+                  List<T> results) {
+        super();
+        this.pageNum = pageNum;
+        this.pageSize = maxSize;
+        this.totalRecord = totalRecord;
+        this.totalPage = totalPage;
+        this.results = results;
+        if (this.pageNum < 2) {
+            hasPreviousPage = false;
+        } else {
+            hasPreviousPage = true;
+        }
+        if (this.pageNum < totalPage) {
+            hasNextPage = true;
+        } else {
+            hasNextPage = false;
+        }
+    }
+
+    public PageVo() {super();}
+
+    public void setHasPreviousAndNext() {
+        if (this.pageNum < 2) {
+            hasPreviousPage = false;
+        } else {
+            hasPreviousPage = true;
+        }
+        if (this.pageNum < totalPage) {
+            hasNextPage = true;
+        } else {
+            hasNextPage = false;
+        }
+    }
+
+    public int countTotalPage() {
+        int total = totalRecord % pageSize == 0 ? totalRecord / pageSize : totalRecord / pageSize + 1;
+        this.setTotalPage(total);
+        return total;
+    }
+
+    private static final long serialVersionUID = 1L;
+}

+ 34 - 0
src/main/java/com/caimei/www/pojo/link/RepairLinkVo.java

@@ -0,0 +1,34 @@
+package com.caimei.www.pojo.link;
+
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 仪器维修分享链接
+ *
+ * @author : Aslee
+ * @date : 2020/9/1
+ */
+@Data
+public class RepairLinkVo implements Serializable {
+    private Integer id;
+    /**
+     * 用户ID
+     */
+    private Integer userId;
+    /**
+     *链接uuid
+     */
+    private String linkCode;
+    /**
+     * 1表示用户, 2表示维修商
+     */
+    private String type;
+    /**
+     * 仪器维修表ID
+     */
+    private Integer cmInstrumentMaintenanceId;
+    private static final long serialVersionUID = 1L;
+}

+ 35 - 0
src/main/java/com/caimei/www/pojo/link/RepairUserVo.java

@@ -0,0 +1,35 @@
+package com.caimei.www.pojo.link;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2021/10/20
+ */
+@Data
+public class RepairUserVo implements Serializable {
+    /**
+     *用户ID
+     */
+    private Integer userId;
+    /**
+     * 用户名
+     */
+    private String userName;
+    /**
+     * 用户类型,见表c_usertype或枚举UserType
+     */
+    private Integer registerUserTypeId;
+    /**
+     * 企业账号名
+     */
+    private String account;
+    /**
+     * 手机号码
+     */
+    private String mobile;
+}

+ 189 - 0
src/main/java/com/caimei/www/pojo/link/RepairVo.java

@@ -0,0 +1,189 @@
+package com.caimei.www.pojo.link;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 仪器维修
+ *
+ * @author : Aslee
+ * @date : 2020/9/1
+ */
+@Data
+public class RepairVo implements Serializable {
+    private Integer id;
+    /**
+     * 订单号
+     */
+    private String orderNo;
+    /**
+     *用户ID
+     */
+    private Integer userId;
+    /**
+     *仪器名称
+     */
+    private String instrumentName;
+    /**
+     *生产厂家
+     */
+    private String manufacturer;
+    /**
+     *仪器品牌/型号
+     */
+    private String instrumentBrand;
+    /**
+     *维修数量
+     */
+    private String maintenanceNum;
+    /**
+     *仪器图1
+     */
+    private String instrumentImage1;
+    /**
+     *仪器图2
+     */
+    private String instrumentImage2;
+    /**
+     *仪器图3
+     */
+    private String instrumentImage3;
+    /**
+     *仪器图4
+     */
+    private String instrumentImage4;
+    /**
+     *仪器图5
+     */
+    private String instrumentImage5;
+    /**
+     * 仪器图,以,隔开
+     */
+    private String instrumentImages;
+    /**
+     * 仪器图数组
+     */
+    private String[] instrumentArr;
+    /**
+     *问题描述
+     */
+    private String problemDescription;
+    /**
+     *用户账号
+     */
+    private String userAccount;
+    /**
+     *用户名称
+     */
+    private String userName;
+    /**
+     *用户联系人
+     */
+    private String userContact;
+    /**
+     *用户手机号
+     */
+    private Long userMobile;
+    /**
+     *用户联系地址
+     */
+    private String userAddress;
+    /**
+     *维修商名称
+     */
+    private String maintainerName;
+    /**
+     * 维修商手机号
+     */
+    private Long maintainerMobile;
+    /**
+     * 维修商联系地址
+     */
+    private String maintainerAddress;
+    /**
+     * 维修状态1.已提交,2已对接(确认真实后)3已评价,4取消
+     */
+    private String status;
+    /**
+     * 真实性 1已核实,2无效
+     */
+    private Long authenticity;
+    /**
+     * 服务评分,一颗心表示1,多颗数次之
+     */
+    private Long serviceRating;
+    /**
+     * 服务评价
+     */
+    private String serviceEvaluate;
+    /**
+     * 是否解决:0未解决,1已解决
+     */
+    private String solveStatus;
+    /**
+     * 取消原因
+     */
+    private String cancelReason;
+    /**
+     * 提交时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date submitDate;
+    /**
+     * 对接时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date dockingDate;
+    /**
+     * 评价时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date evaluateDate;
+    /**
+     * 取消时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private Date cancelDate;
+    /**
+     * 关键词 查询条件
+     */
+    private String keyword;
+    /**
+     * 注册时间开始 查询条件
+     */
+    private String startTime;
+    /**
+     * 注册时间结束  查询条件
+     */
+    private String endTime;
+    /**
+     * 省
+     */
+    private String provinceName;
+    /**
+     * 市
+     */
+    private String cityName;
+    /**
+     * 区
+     */
+    private String townName;
+    /**
+     *能不能评价 true 就是用户可评价,  false 就是供应商不可评价仅查看
+     */
+    private boolean canEvaluation;
+    /**
+     * true 只展示基本信息,  false  展示详细信息
+     */
+    private boolean onlyBaseInfo;
+    /**
+     *信息查看者类型 1=用户查看可以评价; (供应商只能查看不能操作)2=没有对接供应商查看基本信息; 3已对接供应查看完整信息
+     */
+    private String viewerType;
+
+    private static final long serialVersionUID = 1L;
+
+}

+ 41 - 0
src/main/java/com/caimei/www/service/link/RepairService.java

@@ -0,0 +1,41 @@
+package com.caimei.www.service.link;
+
+import com.caimei.www.pojo.JsonModel;
+import com.caimei.www.pojo.link.PageVo;
+import com.caimei.www.pojo.link.RepairVo;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2021/10/20
+ */
+public interface RepairService {
+    /**
+     * 维修列表
+     * @param repairVo 维修列表查询条件
+     * @param pageVo 分页对象
+     * @return
+     */
+    JsonModel findMaintenance(RepairVo repairVo, PageVo pageVo);
+
+    /**
+     * 申请维修
+     * @param repairVo 申请维修提交的数据
+     */
+    JsonModel applyMaintenance(RepairVo repairVo);
+
+    /**
+     * 维修详情
+     * @param id
+     */
+    JsonModel findMaintenanceDetail(Integer id);
+
+    /**
+     * 评价维修
+     * @param solveStatus    是否解决问题:0未解决,1已解决
+     * @param serviceRating  服务评分,一颗心表示1,多颗数次之
+     * @param serviceEvaluate  服务评价
+     */
+    JsonModel evaluationMaintenance(Integer id, String solveStatus, String serviceRating, String serviceEvaluate);
+}

+ 223 - 0
src/main/java/com/caimei/www/service/link/impl/RepairServiceImpl.java

@@ -0,0 +1,223 @@
+package com.caimei.www.service.link.impl;
+
+import com.caimei.www.mapper.RepairDao;
+import com.caimei.www.pojo.JsonModel;
+import com.caimei.www.pojo.link.PageVo;
+import com.caimei.www.pojo.link.RepairLinkVo;
+import com.caimei.www.pojo.link.RepairUserVo;
+import com.caimei.www.pojo.link.RepairVo;
+import com.caimei.www.service.link.RepairService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.util.StringUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.lang.reflect.Method;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2021/10/20
+ */
+@Slf4j
+@Service
+public class RepairServiceImpl implements RepairService {
+    @Resource
+    private RepairDao repairDao;
+
+    /**
+     * 维修列表
+     *
+     * @param repairVo 维修列表查询条件
+     * @param page   分页对象
+     * @return
+     */
+    @Override
+    public JsonModel findMaintenance(RepairVo repairVo, PageVo page) {
+        if (repairVo.getUserId() == null) {
+            return JsonModel.error("参数错误");
+        }
+        PageHelper.startPage(page.getPageNum(), page.getPageSize());
+        List<RepairVo> list = repairDao.findMaintenance(repairVo);
+        PageVo<RepairVo> pageVo = new PageVo<>(list);
+        return JsonModel.success(pageVo);
+    }
+
+    /**
+     * 申请维修
+     *
+     * @param repairVo 申请维修提交的数据
+     */
+    @Override
+    public JsonModel applyMaintenance(RepairVo repairVo) {
+        JsonModel JsonModel = paramsCheck(repairVo);
+        if (JsonModel.getCode() == -1) {
+            return JsonModel;
+        }
+        if (repairVo.getUserId() != null) {
+            RepairUserVo user = repairDao.getRepairUser(repairVo.getUserId());
+            repairVo.setUserId(user.getUserId());
+            repairVo.setUserName(user.getUserName());
+            if (user.getRegisterUserTypeId() == 1 || user.getRegisterUserTypeId() == 3) {
+                repairVo.setUserAccount(user.getAccount());
+            } else {
+                repairVo.setUserAccount(user.getMobile());
+            }
+        }
+        try {
+            String date = new SimpleDateFormat("yyyyMMdd").format(new Date());
+            //维修单号orderNo的生成规则 日期加上两位数字  2019080801
+            String orderNo = repairDao.findOrderNoInToday(date);
+            String no;
+            if (StringUtil.isEmpty(orderNo)) {
+                no = "01";
+            } else {
+                String substring = orderNo.substring(8);
+                int number = Integer.parseInt(substring);
+                number += 1;
+                if (number <= 9) {
+                    no = "0" + number;
+                } else {
+                    no = String.valueOf(number);
+                }
+            }
+            repairVo.setOrderNo(date + no);
+            repairVo.setSubmitDate(new Date());
+            //维修状态1.已提交,2已对接(确认真实后)3已评价,4取消
+            repairVo.setStatus("1");
+            String instrumentImages = repairVo.getInstrumentImages();
+            if (StringUtil.isNotEmpty(instrumentImages)) {
+                String[] instrumentImageArr = instrumentImages.split(",");
+                if (instrumentImageArr.length > 5) {
+                    return JsonModel.error("图片数量不能超过5张");
+                }
+                Class clazz = repairVo.getClass();
+                for (int i = 0; i < instrumentImageArr.length; i++) {
+                    Method method =  clazz.getDeclaredMethod("setInstrumentImage" + (i + 1),String.class);
+                    method.invoke(repairVo, instrumentImageArr[i]);
+                }
+            }
+            repairDao.insertMaintenance(repairVo);
+            RepairLinkVo userLink = new RepairLinkVo();
+            userLink.setType("1");
+            userLink.setUserId(repairVo.getUserId());
+            userLink.setCmInstrumentMaintenanceId(repairVo.getId());
+            userLink.setLinkCode(UUID.randomUUID().toString().replaceAll("-", ""));
+            RepairLinkVo repairerLink = new RepairLinkVo();
+            repairerLink.setType("2");
+            repairerLink.setUserId(repairVo.getUserId());
+            repairerLink.setCmInstrumentMaintenanceId(repairVo.getId());
+            repairerLink.setLinkCode(UUID.randomUUID().toString().replaceAll("-", ""));
+            repairDao.insertMaintenanceLink(userLink);
+            repairDao.insertMaintenanceLink(repairerLink);
+        } catch (Exception e) {
+            log.error("try-catch:",e);
+            return JsonModel.error("数据异常");
+        }
+        return JsonModel;
+    }
+
+    /**
+     * 维修详情
+     *
+     * @param id
+     */
+    @Override
+    public JsonModel findMaintenanceDetail(Integer id) {
+        if (id == null) {
+            return JsonModel.error("参数异常");
+        }
+        RepairVo repairVo = repairDao.findMaintenanceDetail(id);
+        if (repairVo == null) {
+            return JsonModel.error("参数异常");
+        }
+        Class clazz = repairVo.getClass();
+        List<String> instrumentImageList = new ArrayList<>();
+        for (int i = 0; i < 5; i++) {
+            try {
+                Method getMethod = clazz.getDeclaredMethod("getInstrumentImage" + (i+1));
+                Object image = getMethod.invoke(repairVo);
+                if (image != null && StringUtil.isNotEmpty(image.toString())) {
+                    instrumentImageList.add(image.toString()) ;
+                }
+            } catch (Exception e) {
+                log.error("try-catch:",e);
+            }
+        }
+        String[] instrumentArr = instrumentImageList.toArray(new String[instrumentImageList.size()]);
+        if (instrumentArr.length == 0) {
+            repairVo.setInstrumentArr(null);
+        }else{
+            repairVo.setInstrumentArr(instrumentArr);
+        }
+        return JsonModel.success(repairVo);
+    }
+
+    /**
+     * 评价维修
+     *
+     * @param id
+     * @param solveStatus     是否解决问题:0未解决,1已解决
+     * @param serviceRating   服务评分,一颗心表示1,多颗数次之
+     * @param serviceEvaluate 服务评价
+     */
+    @Override
+    public JsonModel evaluationMaintenance(Integer id, String solveStatus, String serviceRating, String serviceEvaluate) {
+        if (id  == null || StringUtil.isEmpty(solveStatus) || StringUtil.isEmpty(serviceEvaluate) || StringUtil.isEmpty(serviceRating)) {
+            return JsonModel.error("参数不全");
+        }
+        RepairVo repairVo = repairDao.findMaintenanceDetail(id);
+        if (repairVo == null){
+            return JsonModel.error("参数异常");
+        }
+        try {
+            repairVo.setServiceEvaluate(serviceEvaluate);
+            repairVo.setServiceRating(Long.valueOf(serviceRating));
+            repairVo.setSolveStatus(solveStatus);
+            repairVo.setStatus("3");
+            repairVo.setEvaluateDate(new Date());
+            repairDao.updateMaintenace(repairVo);
+        } catch (Exception e) {
+            JsonModel.error("服务器内部异常");
+        }
+        return JsonModel.success();
+    }
+
+    /**
+     * 验证提交的维修信息
+     */
+    private JsonModel paramsCheck(RepairVo bean) {
+        if (StringUtil.isEmpty(bean.getProvinceName()) || StringUtil.isEmpty(bean.getCityName())
+                || StringUtil.isEmpty(bean.getTownName()) || StringUtil.isEmpty(bean.getUserAddress())) {
+            return JsonModel.error("地址信息不全");
+        }
+        if (StringUtil.isEmpty(bean.getUserContact())) {
+            return JsonModel.error("联系人信息不全");
+        }
+        if (bean.getUserMobile() == null) {
+            return JsonModel.error("联系电话信息不全");
+        }
+        if (StringUtil.isEmpty(bean.getInstrumentName())) {
+            return JsonModel.error("仪器名称信息不全");
+        }
+        if (StringUtil.isEmpty(bean.getProblemDescription())) {
+            return JsonModel.error("问题描述信息不全");
+        }
+        //同一手机号同一天内只能提交一次申请
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        //CmInstrumentMaintenance 的orderNo 生成规则就是  2019080802 日期加数字的规则,通过模糊查询查询出用户今日提交次数
+        int times = repairDao.checkMobileSubmitTime(bean.getUserMobile().toString(), sdf.format(new Date()));
+        if (times != 0) {
+            return JsonModel.error("抱歉,您今天已经提交过了");
+        }
+        return JsonModel.success();
+    }
+
+}

+ 184 - 0
src/main/resources/mapper/RepairMapper.xml

@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei.www.mapper.RepairDao">
+    <select id="findMaintenance" resultType="com.caimei.www.pojo.link.RepairVo">
+        SELECT
+        id,
+        orderNo,
+        instrumentName,
+        manufacturer,
+        submitDate,
+        maintainerName,
+        maintainerMobile,
+        status
+        FROM cm_instrument_maintenance a
+        <where>
+            <if test="userId != null">
+                AND a.userId = #{userId}
+            </if>
+            <if test="keyword != null and keyword != ''">
+                AND (a.maintainerName LIKE concat('%',#{keyword},'%')
+                OR a.instrumentName LIKE concat('%',#{keyword},'%'))
+            </if>
+            <if test="startTime != null and startTime != ''">
+                AND a.submitDate <![CDATA[ >= ]]> #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND a.submitDate <![CDATA[ <= ]]>  #{endTime}
+            </if>
+            <if test="status != null and status != '' and status != 0">
+                AND a.status = ${status}
+            </if>
+        </where>
+    </select>
+    <select id="getRepairUser" resultType="com.caimei.www.pojo.link.RepairUserVo">
+        SELECT
+            userID AS userId, userName, account, mobile, registerUserTypeID AS registerUserTypeId
+        FROM user WHERE userID = #{userId}
+    </select>
+    <select id="findOrderNoInToday" resultType="java.lang.String">
+        SELECT IFNULL(orderNo,"")
+        FROM cm_instrument_maintenance
+        WHERE DATE_FORMAT(submitDate,'%Y%m%d') = #{date} AND submitDate is not null
+        ORDER BY id DESC limit 1
+    </select>
+    <select id="findMaintenanceDetail" resultType="com.caimei.www.pojo.link.RepairVo">
+        SELECT
+            id,
+            orderNo,
+            userId,
+            instrumentName,
+            manufacturer,
+            instrumentBrand,
+            maintenanceNum,
+            instrumentImage1,
+            instrumentImage2,
+            instrumentImage3,
+            instrumentImage4,
+            instrumentImage5,
+            problemDescription,
+            userAccount,
+            userName,
+            userContact,
+            userMobile,
+            userAddress,
+            maintainerName,
+            maintainerMobile,
+            maintainerAddress,
+            status,
+            authenticity,
+            serviceRating,
+            serviceEvaluate,
+            solveStatus,
+            cancelReason,
+            submitDate,
+            dockingDate,
+            evaluateDate,
+            cancelDate,
+            provinceName,
+            cityName,
+            townName
+        FROM cm_instrument_maintenance
+        WHERE id = #{id}
+    </select>
+    <select id="checkMobileSubmitTime" resultType="java.lang.Integer">
+        SELECT count(id)
+        FROM cm_instrument_maintenance
+        WHERE userMobile = #{mobile} AND orderNo LIKE concat(#{date},"%")
+    </select>
+    <insert id="insertMaintenance">
+        INSERT INTO cm_instrument_maintenance(
+            orderNo,
+            userId,
+            instrumentName,
+            manufacturer,
+            instrumentBrand,
+            maintenanceNum,
+            instrumentImage1,
+            instrumentImage2,
+            instrumentImage3,
+            instrumentImage4,
+            instrumentImage5,
+            problemDescription,
+            userAccount,
+            userName,
+            userContact,
+            userMobile,
+            userAddress,
+            maintainerName,
+            maintainerMobile,
+            maintainerAddress,
+            status,
+            authenticity,
+            serviceRating,
+            serviceEvaluate,
+            solveStatus,
+            cancelReason,
+            submitDate,
+            dockingDate,
+            evaluateDate,
+            cancelDate,
+            provinceName,
+            cityName,
+            townName
+        ) VALUES (
+             #{orderNo},
+             #{userId},
+             #{instrumentName},
+             #{manufacturer},
+             #{instrumentBrand},
+             #{maintenanceNum},
+             #{instrumentImage1},
+             #{instrumentImage2},
+             #{instrumentImage3},
+             #{instrumentImage4},
+             #{instrumentImage5},
+             #{problemDescription},
+             #{userAccount},
+             #{userName},
+             #{userContact},
+             #{userMobile},
+             #{userAddress},
+             #{maintainerName},
+             #{maintainerMobile},
+             #{maintainerAddress},
+             #{status},
+             #{authenticity},
+             #{serviceRating},
+             #{serviceEvaluate},
+             #{solveStatus},
+             #{cancelReason},
+             #{submitDate},
+             #{dockingDate},
+             #{evaluateDate},
+             #{cancelDate},
+             #{provinceName},
+             #{cityName},
+             #{townName}
+         )
+    </insert>
+    <insert id="insertMaintenanceLink">
+        INSERT INTO cm_instrument_maintenance_links(
+            id,
+            userId,
+            linkCode,
+            type,
+            cmInstrumentMaintenanceId
+        ) VALUES (
+             #{id},
+             #{userId},
+             #{linkCode},
+             #{type},
+             #{cmInstrumentMaintenanceId}
+         )
+    </insert>
+    <update id="updateMaintenace">
+        update cm_instrument_maintenance
+        SET serviceRating = #{serviceRating},
+            serviceEvaluate = #{serviceEvaluate},
+            solveStatus = #{solveStatus} ,
+            status = #{status},
+            evaluateDate = #{evaluateDate}
+        WHERE id = #{id}
+    </update>
+</mapper>

+ 2 - 2
src/main/resources/static/js/account/register-club.js

@@ -421,7 +421,7 @@ var registerPage = new Vue({
         },
         ChangeGetcity:function(event){//加载市
             var _this = this;
-            PublicApi.GetCity({ provinceId: _this.addressfrom.province },function(response){
+            PublicApi.GetCity({ type:1, parentId: _this.addressfrom.province },function(response){
                 if(response.code == 0 ){
                     _this.cityArray = response.data;
                     _this.addressfrom.city = event.target.value;
@@ -438,7 +438,7 @@ var registerPage = new Vue({
         },
         ChangeGetcTown:function(event){//选择地区
             var _this = this;
-            PublicApi.GetTown({ cityId: _this.addressfrom.city },function(response){
+            PublicApi.GetTown({ type:2, parentId: _this.addressfrom.city },function(response){
                 if(response.code == 0 ){
                     _this.townArray = response.data;
                     _this.clubUpgradeUser.townId = event.target.value;

+ 2 - 2
src/main/resources/static/js/account/register-supplier.js

@@ -259,7 +259,7 @@ var registerPage = new Vue({
         },
         ChangeGetcity:function(event){//加载市
             var _this = this;
-            PublicApi.GetCity({ provinceId: _this.addressfrom.province },function(response){
+            PublicApi.GetCity({ type:1, parentId: _this.addressfrom.province },function(response){
                 if(response.code == 0 ){
                     _this.cityArray = response.data;
                     _this.addressfrom.city = event.target.value;
@@ -276,7 +276,7 @@ var registerPage = new Vue({
         },
         ChangeGetcTown:function(event){//选择地区
             var _this = this;
-            PublicApi.GetTown({ cityId: _this.addressfrom.city },function(response){
+            PublicApi.GetTown({ type:2, parentId: _this.addressfrom.city },function(response){
                 if(response.code == 0 ){
                     _this.townArray = response.data;
                     _this.supplierUser.townId = event.target.value;

+ 2 - 2
src/main/resources/static/js/account/supplier-information.js

@@ -228,7 +228,7 @@ var registerPage = new Vue({
         },
         ChangeGetcity:function(event){//加载市
             var _this = this;
-            PublicApi.GetCity({ provinceId: _this.supplierUser.provinceId },function(response){
+            PublicApi.GetCity({ type:1, parentId: _this.supplierUser.provinceId },function(response){
                 if(response.code == 0 ){
                     _this.cityArray = response.data;
                     _this.supplierUser.cityId = event.target.value;
@@ -245,7 +245,7 @@ var registerPage = new Vue({
         },
         ChangeGetcTown:function(event){//选择地区
             var _this = this;
-            PublicApi.GetTown({ cityId: _this.supplierUser.cityId },function(response){
+            PublicApi.GetTown({ type:2, parentId: _this.supplierUser.cityId },function(response){
                 if(response.code == 0 ){
                     _this.townArray = response.data;
                     _this.supplierUser.townId = event.target.value;

+ 1 - 1
src/main/resources/static/js/common/ajax.service.js

@@ -11,7 +11,7 @@
 */
 var Http = {
         AjaxService : function(option){
-            var NODE_ENV_BASE_URL = $("#spiServer").val();
+            var NODE_ENV_BASE_URL = '';
             if(option.isHost){
                 NODE_ENV_BASE_URL = $("#coreServer").val();
             }

+ 4 - 4
src/main/resources/static/js/common/serviceapi/repair.service.js

@@ -7,7 +7,7 @@ var RepairApi = {
         /* 查询用户维修列表 */
         GetFindMaintenance: function (params, callback) {
             Http.AjaxService({
-                url:'/pcCenter/findMaintenance',
+                url:'/repair/list',
                 type:'GET',
                 data:params,
                 json:false
@@ -19,7 +19,7 @@ var RepairApi = {
         /* 用户申请维修 */
         AddApplyMaintenance: function (params, callback) {
             Http.AjaxService({
-                url:'/pcCenter/applyMaintenance',
+                url:'/repair/apply',
                 type:'POST',
                 data:params,
                 json:false
@@ -31,7 +31,7 @@ var RepairApi = {
          /* 维修详情 */
         MaintenanceDetail: function (params, callback) {
             Http.AjaxService({
-                url:'/pcCenter/maintenance/detail',
+                url:'/repair/detail',
                 type:'GET',
                 data:params,
                 json:false
@@ -56,7 +56,7 @@ var RepairApi = {
         /* 维修详情 提交评论 */
        evaluation: function (params, callback) {
             Http.AjaxService({
-                url:'/pcCenter/maintenance/evaluation',
+                url:'/repair/evaluation',
                 type:'POST',
                 data:params,
                 json:false

+ 9 - 6
src/main/resources/static/js/common/serviceapi/utils.service.js

@@ -97,10 +97,11 @@ var PublicApi = {
         // },
         GetProvince:function(params,callback){ //获取省份信息
             Http.AjaxService({
-                url:'/club/province',
+                url:'/order/address/select',
                 type:'get',
                 data:params,
-                json:false
+                json:false,
+                isHost:true
             })
             .then(function(res){
                 callback(res)
@@ -108,10 +109,11 @@ var PublicApi = {
         },
         GetCity:function(params,callback){ //获取区分信息
             Http.AjaxService({
-                url:'/club/city',
+                url:'/order/address/select',
                 type:'get',
                 data:params,
-                json:true
+                json:false,
+                isHost:true
             })
             .then(function(res){
                 callback(res)
@@ -119,10 +121,11 @@ var PublicApi = {
         },
         GetTown:function(params,callback){ //获取市信息
             Http.AjaxService({
-                url:'/club/town',
+                url:'/order/address/select',
                 type:'get',
                 data:params,
-                json:true
+                json:false,
+                isHost:true
             })
             .then(function(res){
                 callback(res)

+ 1 - 1
src/main/resources/static/js/flea-market/form.js

@@ -479,7 +479,7 @@ var fleaMarketForm = new Vue({
         },
         getcity:function(event){//加载市
            var _this = this;
-            PublicApi.GetCity({ provinceId: _this.from.province },function(response){
+            PublicApi.GetCity({ type:1, parentId: _this.from.province },function(response){
                  if(response.code == 0 ){
                     _this.cityArray = response.data;
                      _this.from.city = event.target.value;

+ 1 - 1
src/main/resources/static/js/supplier-center/setting/information.js

@@ -405,7 +405,7 @@
         },
         getcity:function(event){//加载市
            var _this = this;
-            PublicApi.GetCity({ provinceId: _this.params.provinceId },function(response){
+            PublicApi.GetCity({ type:1, parentId: _this.params.provinceId },function(response){
                  if(response.code == 0 ){
                     _this.cityArray = response.data;
                      _this.params.cityId = event.target.value;

+ 2 - 2
src/main/resources/static/js/user-center/repair/form-user.js

@@ -100,7 +100,7 @@ var addFormPage = new Vue({
         },
         GetCtiyFn: function(){//获取市
             var _self = this;
-            PublicApi.GetCity({ provinceId: _self.addressfrom.province },function(response){
+            PublicApi.GetCity({ type:1, parentId: _self.addressfrom.province },function(response){
                 if(response.code == 0 ){
                     _self.cityArray = response.data;
                 }else{
@@ -110,7 +110,7 @@ var addFormPage = new Vue({
         },
         GetTownFn: function(){//获取区
             var _self = this;
-            PublicApi.GetTown({ cityId: _self.addressfrom.city },function(response){
+            PublicApi.GetTown({ type:2, parentId: _self.addressfrom.city },function(response){
                 if(response.code == 0 ){
                     _self.townArray = response.data;
                 }else{

+ 1 - 1
src/main/resources/static/js/user-center/repair/repair.js

@@ -90,7 +90,7 @@ var repairForm = new Vue({
            var donClass = '#cityname';
            var domCityname =  document.querySelector(donClass);
            _this.postData.cityName = domCityname.options[domCityname.selectedIndex].text;
-            PublicApi.GetCity({ provinceId: _this.provinceID },function(response){
+            PublicApi.GetCity({ type:1, parentId: _this.provinceID },function(response){
                  if(response.code == 0 ){
                     _this.cityArray = response.data;
                      _this.cityID = event.target.value;

+ 2 - 2
src/main/resources/static/js/user-center/setting/information.js

@@ -422,7 +422,7 @@ var informationPage = new Vue({
         },
         GetCtiyFn: function(){//获取市
             var _self = this;
-            PublicApi.GetCity({ provinceId: _self.addressfrom.provinceId },function(response){
+            PublicApi.GetCity({ type:1, parentId: _self.addressfrom.provinceId },function(response){
                 if(response.code == 0 ){
                     _self.cityArray = response.data;
                 }else{
@@ -432,7 +432,7 @@ var informationPage = new Vue({
         },
         GetTownFn: function(){//获取区
             var _self = this;
-            PublicApi.GetTown({ cityId: _self.addressfrom.cityId },function(response){
+            PublicApi.GetTown({ type:2, parentId: _self.addressfrom.cityId },function(response){
                 if(response.code == 0 ){
                     _self.townArray = response.data;
                 }else{

+ 3 - 3
src/main/resources/static/js/user-center/setting/upgrade.js

@@ -362,7 +362,7 @@ var upgradePage = new Vue({
         // },
         // GetCtiyFn: function(){//获取市
         //     var _self = this;
-        //     PublicApi.GetCity({ provinceId: _self.addressfrom.provinceID },function(response){
+        //     PublicApi.GetCity({ type:1, parentId: _self.addressfrom.provinceID },function(response){
         //         if(response.code == 0 ){
         //             _self.cityArray = response.data;
         //         }else{
@@ -372,7 +372,7 @@ var upgradePage = new Vue({
         // },
         // GetTownFn: function(){//获取区
         //     var _self = this;
-        //     PublicApi.GetTown({ cityId: _self.addressfrom.cityID },function(response){
+        //     PublicApi.GetTown({ type:2, parentId: _self.addressfrom.cityID },function(response){
         //         if(response.code == 0 ){
         //             _self.townArray = response.data;
         //         }else{
@@ -395,7 +395,7 @@ var upgradePage = new Vue({
         },
         getcity:function(event){//加载市
            var _this = this;
-            PublicApi.GetCity({ provinceId: _this.clubUpgradeUser.provinceId },function(response){
+            PublicApi.GetCity({ type:1, parentId: _this.clubUpgradeUser.provinceId },function(response){
                  if(response.code == 0 ){
                     _this.cityArray = response.data;
                      _this.clubUpgradeUser.cityId = event.target.value;

+ 3 - 3
src/main/resources/templates/account/register-club.html

@@ -93,15 +93,15 @@
                     <div class="address">
                         <select name="provinceID" id="cProvince" @change="ChangeProvince">
                             <option value="" >请选择</option>
-                            <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.provinceID' >{{item.name}}</option>
+                            <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.id' >{{item.name}}</option>
                         </select>
                         <select name="cityID" id="cCity" @change="ChangeGetcity($event)" >
                             <option value="">请选择</option>
-                            <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID" >{{item.name}}</option>
+                            <option v-for="(item ,index) in cityArray" :key="index" :value="item.id" >{{item.name}}</option>
                         </select>
                         <select name="townID" id="cTown" @change="ChangeGetcTown($event)" needverify>
                             <option value="">请选择</option>
-                            <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
+                            <option v-for="(item ,index) in townArray" :key="index" :value="item.id"  >{{item.name}}</option>
                         </select>
                         <textarea placeholder="请输入您的详细联系地址"  v-model="clubUpgradeUser.address" @blur="blurHandle($event)" needverify></textarea>
                         <span class="errTips icon mIcon" tips="请输入正确的联系地址"></span>

+ 3 - 3
src/main/resources/templates/account/register-supplier.html

@@ -91,15 +91,15 @@
                         <p><em>*</em>联系地址:</p>
                         <select name="provinceID" id="cProvince" @change="ChangeProvince">
                             <option value="">请选择</option>
-                            <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.provinceID' >{{item.name}}</option>
+                            <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.id' >{{item.name}}</option>
                         </select>
                         <select name="cityID" id="cCity" @change="ChangeGetcity($event)" >
                             <option value="">请选择</option>
-                            <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID" >{{item.name}}</option>
+                            <option v-for="(item ,index) in cityArray" :key="index" :value="item.id" >{{item.name}}</option>
                         </select>
                         <select name="townID" id="cTown" @change="ChangeGetcTown($event)">
                             <option value="">请选择</option>
-                            <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
+                            <option v-for="(item ,index) in townArray" :key="index" :value="item.id"  >{{item.name}}</option>
                         </select>
                         <span class="errTips icon mIcon"></span>
                     </div>

+ 3 - 3
src/main/resources/templates/account/supplier-information.html

@@ -47,15 +47,15 @@
                         <p><em>*</em>联系地址:</p>
                         <select name="provinceID" id="cProvince" @change="ChangeProvince"  v-model="supplierUser.provinceId">
                             <option value="0">请选择</option>
-                            <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.provinceID'>{{item.name}}</option>
+                            <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.id'>{{item.name}}</option>
                         </select>
                         <select name="cityID" id="cCity" @change="ChangeGetcity($event)" v-model="supplierUser.cityId">
                             <option value="0">请选择</option>
-                            <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID" >{{item.name}}</option>
+                            <option v-for="(item ,index) in cityArray" :key="index" :value="item.id" >{{item.name}}</option>
                         </select>
                         <select name="townID" id="cTown" @change="ChangeGetcTown($event)" v-model="supplierUser.townId">
                             <option value="0">请选择</option>
-                            <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
+                            <option v-for="(item ,index) in townArray" :key="index" :value="item.id"  >{{item.name}}</option>
                         </select>
                         <textarea placeholder="请输入您的详细联系地址"  v-model="supplierUser.address" @blur="blurHandle($event)" needverify></textarea>
                         <i class="checked icon mIcon"></i>

+ 2 - 2
src/main/resources/templates/flea-market/form.html

@@ -135,12 +135,12 @@
                         <i class="cCity icon mIcon selected"></i>
                         <select class="address-input reg-select city" name="cityID" id="cCity" @change="getcity($event)" >
                             <option value="" >请选择</option>
-                            <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID" >{{item.name}}</option>
+                            <option v-for="(item ,index) in cityArray" :key="index" :value="item.id" >{{item.name}}</option>
                         </select>
                         <i class="cTown icon mIcon selected"></i>
                         <select class="address-input reg-select town" name="townID" id="cTown" @change="getcTown($event)">
                             <option value="" >请选择</option>
-                            <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
+                            <option v-for="(item ,index) in townArray" :key="index" :value="item.id"  >{{item.name}}</option>
                         </select>
                         <span class="release-tips errTips icon mIcon" v-show="vShow_TownId">{{fromMessage}}</span>
                             <textarea type="text" id="addressDetails" class="border-grey address-details" v-model="secondParams.address" maxlength="50" placeholder="请填写详细地址,如街道/小区/门牌等" /></textarea>

+ 2 - 2
src/main/resources/templates/supplier-center/setting/information.html

@@ -60,11 +60,11 @@
                                  </select>
                                  <select name="cityID" id="cityID" @change="getcity($event)" v-model="params.cityId">
                                      <option value="0"  selected="">请选择</option>
-                                     <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID">{{item.name}}</option>
+                                     <option v-for="(item ,index) in cityArray" :key="index" :value="item.id">{{item.name}}</option>
                                  </select>
                                  <select name="townID" id="townID" @change="getcTown($event)" v-model="params.townId">
                                      <option value="0">请选择</option>
-                                     <option v-for="(item ,index) in townArray" :key="index" :value="item.townID" >{{item.name}}</option>
+                                     <option v-for="(item ,index) in townArray" :key="index" :value="item.id" >{{item.name}}</option>
                                  </select>
                                  <textarea placeholder="建议您如实填写详细地址,例如:街道名称,门牌号码,楼层和房间号等信息"  v-model="params.address" maxlength="25"></textarea>
                                     <i class="checked icon mIcon"></i>

+ 3 - 3
src/main/resources/templates/user-center/repair/form-user.html

@@ -46,15 +46,15 @@
                             <div class="address">
                                 <select name="province" id="province" ref="cProvince" @change="ChangeProvince" v-model="addressfrom.province">
                                     <option value="" >请选择</option>
-                                    <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.provinceID' >{{item.name}}</option>
+                                    <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.id' >{{item.name}}</option>
                                 </select>
                                 <select name="city" id="cCity" @change="ChangeGetcity($event)" v-model="addressfrom.city">
                                     <option value="" >请选择</option>
-                                    <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID" >{{item.name}}</option>
+                                    <option v-for="(item ,index) in cityArray" :key="index" :value="item.id" >{{item.name}}</option>
                                 </select>
                                 <select name="town" id="cTown" @change="ChangeGetcTown($event)" v-model="addressfrom.town">
                                     <option value="" >请选择</option>
-                                    <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
+                                    <option v-for="(item ,index) in townArray" :key="index" :value="item.id"  >{{item.name}}</option>
                                 </select>
                                 <textarea placeholder="建议您如实填写详细地址,例如:街道名称,门牌号码,楼层和房间号等信息"  v-model.trim="form.userAddress"></textarea>
                             </div>

+ 2 - 2
src/main/resources/templates/user-center/repair/form.html

@@ -45,11 +45,11 @@
                     </select>
                     <select id="cityname" @change="getcity($event)">
                         <option value="">请选择</option>
-                        <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID">{{item.name}}</option>
+                        <option v-for="(item ,index) in cityArray" :key="index" :value="item.id">{{item.name}}</option>
                     </select>
                     <select id="townname" @change="getcTown($event)">
                         <option value="">请选择</option>
-                        <option v-for="(item ,index) in townArray" :key="index" :value="item.townID" >{{item.name}}</option>
+                        <option v-for="(item ,index) in townArray" :key="index" :value="item.id" >{{item.name}}</option>
                     </select>
                     <textarea v-model.trim="postData.userAddress" placeholder="建议您如实填写详细收货地址,例如:街道名称,门牌号码,楼层和房间号等信息"></textarea>
                 </div>

+ 3 - 3
src/main/resources/templates/user-center/setting/information.html

@@ -63,15 +63,15 @@
                                 <div class="address">
                                     <select name="provinceID" id="cProvince" @change="ChangeProvince" v-model="clubUpgradeUser.provinceId">
                                         <option value="" >请选择</option>
-                                        <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.provinceID' >{{item.name}}</option>
+                                        <option v-for="(item ,index) in ProvinceList" :key="index" :value='item.id' >{{item.name}}</option>
                                     </select>
                                     <select name="cityID" id="cCity" @change="ChangeGetcity($event)" v-model="clubUpgradeUser.cityId">
                                         <option value="" >请选择</option>
-                                        <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID" >{{item.name}}</option>
+                                        <option v-for="(item ,index) in cityArray" :key="index" :value="item.id" >{{item.name}}</option>
                                     </select>
                                     <select name="townID" id="cTown" @change="ChangeGetcTown($event)" v-model="clubUpgradeUser.townId">
                                         <option value="" >请选择</option>
-                                        <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
+                                        <option v-for="(item ,index) in townArray" :key="index" :value="item.id"  >{{item.name}}</option>
                                     </select>
                                     <textarea placeholder="建议您如实填写详细地址,例如:街道名称,门牌号码,楼层和房间号等信息"  v-model="clubUpgradeUser.address" ></textarea>
                                     <i class="checked icon mIcon"></i>

+ 2 - 2
src/main/resources/templates/user-center/setting/upgrade.html

@@ -58,11 +58,11 @@
                                     </select>
                                     <select name="cityID" id="cCity" @change="getcity($event)" v-model="clubUpgradeUser.cityId">
                                         <option value="0" >请选择</option>
-                                        <option v-for="(item ,index) in cityArray" :key="index" :value="item.cityID" >{{item.name}}</option>
+                                        <option v-for="(item ,index) in cityArray" :key="index" :value="item.id" >{{item.name}}</option>
                                     </select>
                                     <select name="townID" id="cTown" @change="getcTown($event)" v-model="clubUpgradeUser.townId">
                                         <option value="0" >请选择</option>
-                                        <option v-for="(item ,index) in townArray" :key="index" :value="item.townID"  >{{item.name}}</option>
+                                        <option v-for="(item ,index) in townArray" :key="index" :value="item.id"  >{{item.name}}</option>
                                     </select>
                                     <textarea placeholder="建议您如实填写详细地址,例如:街道名称,门牌号码,楼层和房间号等信息"  v-model="clubUpgradeUser.address"></textarea>
                                 </div>