Browse Source

客户管理优化

dxq 3 weeks ago
parent
commit
e4543bc5ba

+ 4
- 18
sto/src/main/java/com/shinsoft/sto/model/main/Customer.java View File

2
 
2
 
3
 import com.baomidou.mybatisplus.annotation.TableId;
3
 import com.baomidou.mybatisplus.annotation.TableId;
4
 import com.baomidou.mybatisplus.annotation.TableName;
4
 import com.baomidou.mybatisplus.annotation.TableName;
5
+import com.shinsoft.generator.model.BaseModel;
5
 import io.swagger.annotations.ApiModel;
6
 import io.swagger.annotations.ApiModel;
6
 import io.swagger.annotations.ApiModelProperty;
7
 import io.swagger.annotations.ApiModelProperty;
7
 import lombok.Getter;
8
 import lombok.Getter;
11
 @Getter
12
 @Getter
12
 @Setter
13
 @Setter
13
 @Accessors(chain = true)
14
 @Accessors(chain = true)
14
-@TableName("STO_MAIN_CUSTOMER")
15
+@TableName("T_MAIN_CUSTOMER")
15
 @ApiModel(value = "仓库客户", description = "仓库客户基本信息表")
16
 @ApiModel(value = "仓库客户", description = "仓库客户基本信息表")
16
-public class Customer {
17
-
18
-    @TableId("ID")
19
-    @ApiModelProperty("主键ID")
20
-    private String id;
17
+public class Customer extends BaseModel {
21
 
18
 
22
     @ApiModelProperty("客户名称")
19
     @ApiModelProperty("客户名称")
23
     private String customerNm;
20
     private String customerNm;
29
     private String contactInfo;
26
     private String contactInfo;
30
     @ApiModelProperty("默认地址")
27
     @ApiModelProperty("默认地址")
31
     private String defaultAddress;
28
     private String defaultAddress;
32
-    @ApiModelProperty("新增人id")
33
-    private String addId;
34
-    @ApiModelProperty("新增时间")
35
-    private String addTime;
36
-    @ApiModelProperty("编辑人id")
37
-    private String modifyId;
38
-    @ApiModelProperty("修改时间")
39
-    private String modifyTime;
40
-    @ApiModelProperty("作废标识0作废1正常")
41
-    private String cancelFlag;
42
-    @ApiModelProperty("添加部门id")
43
-    private String addDeptId;
29
+
44
 
30
 
45
 
31
 
46
 }
32
 }

+ 4
- 4
sto/src/main/java/com/shinsoft/sto/service/main/impl/CustomerServiceImp.java View File

77
         if (StringUtils.isEmpty(customer.getId())) {
77
         if (StringUtils.isEmpty(customer.getId())) {
78
             customer.setCancelFlag("0");
78
             customer.setCancelFlag("0");
79
             customer.setAddId(userId);
79
             customer.setAddId(userId);
80
-            customer.setAddTime(date.toString());
80
+            customer.setAddTime(date);
81
             customerMapper.insert(customer);
81
             customerMapper.insert(customer);
82
         } else {
82
         } else {
83
             customer.setModifyId(userId);
83
             customer.setModifyId(userId);
84
-            customer.setModifyTime(date.toString());
84
+            customer.setModifyTime(date);
85
             customerMapper.updateById(customer);
85
             customerMapper.updateById(customer);
86
         }
86
         }
87
 
87
 
95
         Customer customer = customerMapper.selectById(id);
95
         Customer customer = customerMapper.selectById(id);
96
         customer.setCancelFlag("1");
96
         customer.setCancelFlag("1");
97
         customer.setModifyId(userId);
97
         customer.setModifyId(userId);
98
-        customer.setModifyTime(date.toString());
98
+        customer.setModifyTime(date);
99
         customerMapper.updateById(customer);
99
         customerMapper.updateById(customer);
100
         resultJSON = JSONTools.toResultJSON("");
100
         resultJSON = JSONTools.toResultJSON("");
101
         return resultJSON;
101
         return resultJSON;
111
             customer = customerMapper.selectById(id);
111
             customer = customerMapper.selectById(id);
112
             customer.setCancelFlag("1");
112
             customer.setCancelFlag("1");
113
             customer.setModifyId(userId);
113
             customer.setModifyId(userId);
114
-            customer.setModifyTime(date.toString());
114
+            customer.setModifyTime(date);
115
             customerMapper.updateById(customer);
115
             customerMapper.updateById(customer);
116
         }
116
         }
117
         resultJSON = JSONTools.toResultJSON("");
117
         resultJSON = JSONTools.toResultJSON("");

Loading…
Cancel
Save