Commit 3463fb49e499d79095f1158bd4bfa91b1bf5c74d
1 parent
72bdd6c6
category
Showing
4 changed files
with
60 additions
and
106 deletions
src/main/java/com/diligrp/xtrade/product/domain/dto/CategoryDto.java
1 | 1 | package com.diligrp.xtrade.product.domain.dto; |
2 | 2 | |
3 | -import com.diligrp.xtrade.shared.domain.BaseDo; | |
4 | 3 | |
5 | 4 | /** |
6 | 5 | * @ClassName: CategoryDto |
... | ... | @@ -10,9 +9,9 @@ import com.diligrp.xtrade.shared.domain.BaseDo; |
10 | 9 | */ |
11 | 10 | public class CategoryDto{ |
12 | 11 | /** |
13 | - * 快捷简码 | |
12 | + * 品类id | |
14 | 13 | */ |
15 | - private String categoryId; | |
14 | + private String cateId; | |
16 | 15 | /** |
17 | 16 | * 品类名称 |
18 | 17 | */ |
... | ... | @@ -49,11 +48,12 @@ public class CategoryDto{ |
49 | 48 | * 品类等级 |
50 | 49 | */ |
51 | 50 | private Integer level; |
52 | - public String getCategoryId() { | |
53 | - return categoryId; | |
51 | + | |
52 | + public String getCateId() { | |
53 | + return cateId; | |
54 | 54 | } |
55 | - public void setCategoryId(String categoryId) { | |
56 | - this.categoryId = categoryId; | |
55 | + public void setCateId(String cateId) { | |
56 | + this.cateId = cateId; | |
57 | 57 | } |
58 | 58 | public String getCname() { |
59 | 59 | return cname; | ... | ... |
src/main/java/com/diligrp/xtrade/product/domain/entity/CategoryDo.java
... | ... | @@ -10,9 +10,9 @@ import com.diligrp.xtrade.shared.domain.BaseDo; |
10 | 10 | */ |
11 | 11 | public class CategoryDo extends BaseDo{ |
12 | 12 | /** |
13 | - * 快捷简码 | |
13 | + * 品类id | |
14 | 14 | */ |
15 | - private String categoryId; | |
15 | + private String cateId; | |
16 | 16 | /** |
17 | 17 | * 品类名称 |
18 | 18 | */ |
... | ... | @@ -49,11 +49,12 @@ public class CategoryDo extends BaseDo{ |
49 | 49 | * 品类等级 |
50 | 50 | */ |
51 | 51 | private Integer level; |
52 | - public String getCategoryId() { | |
53 | - return categoryId; | |
52 | + | |
53 | + public String getCateId() { | |
54 | + return cateId; | |
54 | 55 | } |
55 | - public void setCategoryId(String categoryId) { | |
56 | - this.categoryId = categoryId; | |
56 | + public void setCateId(String cateId) { | |
57 | + this.cateId = cateId; | |
57 | 58 | } |
58 | 59 | public String getCname() { |
59 | 60 | return cname; | ... | ... |
src/main/java/com/diligrp/xtrade/product/domain/entity/ShopDo.java
... | ... | @@ -6,6 +6,13 @@ package com.diligrp.xtrade.product.domain.entity; |
6 | 6 | |
7 | 7 | import com.diligrp.xtrade.shared.domain.BaseDo; |
8 | 8 | |
9 | +/** | |
10 | + * | |
11 | + * @ClassName: ShopDo | |
12 | + * @Description TODO(用一句话描述该文件做什么) | |
13 | + * @author yangfan | |
14 | + * @date 2020年4月21日 | |
15 | + */ | |
9 | 16 | public class ShopDo extends BaseDo { |
10 | 17 | |
11 | 18 | //商户id |
... | ... | @@ -35,110 +42,46 @@ public class ShopDo extends BaseDo { |
35 | 42 | //描述 |
36 | 43 | private String description; |
37 | 44 | |
38 | - public ShopDo(){ | |
45 | + public Long getMerId() { | |
46 | + return merId; | |
39 | 47 | } |
40 | 48 | |
41 | - public ShopDo(Long shopId, Integer type){ | |
42 | - this.shopId = shopId; | |
43 | - this.type = type; | |
49 | + public void setMerId(Long merId) { | |
50 | + this.merId = merId; | |
44 | 51 | } |
45 | 52 | |
46 | - /** | |
47 | - * 获取 门店编码 | |
48 | - * @return | |
49 | - */ | |
50 | - public Long getShopId(){ | |
53 | + public Long getShopId() { | |
51 | 54 | return shopId; |
52 | 55 | } |
53 | - | |
54 | - /** | |
55 | - * 设置 门店编码 | |
56 | - * @param shopId | |
57 | - */ | |
58 | - public void setShopId(Long shopId){ | |
56 | + | |
57 | + public void setShopId(Long shopId) { | |
59 | 58 | this.shopId = shopId; |
60 | 59 | } |
61 | 60 | |
62 | - /** | |
63 | - * 获取 门店名称 | |
64 | - * @return | |
65 | - */ | |
66 | - public String getShopName(){ | |
61 | + public String getShopName() { | |
67 | 62 | return shopName; |
68 | 63 | } |
69 | - | |
70 | - /** | |
71 | - * 设置 门店名称 | |
72 | - * @param shopName | |
73 | - */ | |
74 | - public void setShopName(String shopName){ | |
64 | + | |
65 | + public void setShopName(String shopName) { | |
75 | 66 | this.shopName = shopName; |
76 | 67 | } |
77 | 68 | |
78 | - /** | |
79 | - * 获取 门店地址 | |
80 | - * @return | |
81 | - */ | |
82 | - public String getAddress(){ | |
83 | - return address; | |
84 | - } | |
85 | - | |
86 | - /** | |
87 | - * 设置 门店地址 | |
88 | - * @param address | |
89 | - */ | |
90 | - public void setAddress(String address){ | |
91 | - this.address = address; | |
69 | + public Integer getType() { | |
70 | + return type; | |
92 | 71 | } |
93 | 72 | |
94 | - /** | |
95 | - * 获取 所属商户编码 | |
96 | - * @return | |
97 | - */ | |
98 | - public Long getMerId(){ | |
99 | - return merId; | |
100 | - } | |
101 | - | |
102 | - /** | |
103 | - * 设置 所属商户编码 | |
104 | - * @param merId | |
105 | - */ | |
106 | - public void setMerId(Long merId){ | |
107 | - this.merId = merId; | |
73 | + public void setType(Integer type) { | |
74 | + this.type = type; | |
108 | 75 | } |
109 | 76 | |
110 | - /** | |
111 | - * 获取 门店状态 | |
112 | - * @return | |
113 | - */ | |
114 | - public Integer getStatus(){ | |
77 | + public Integer getStatus() { | |
115 | 78 | return status; |
116 | 79 | } |
117 | - | |
118 | - /** | |
119 | - * 设置 门店状态 | |
120 | - * @param status | |
121 | - */ | |
122 | - public void setStatus(Integer status){ | |
80 | + | |
81 | + public void setStatus(Integer status) { | |
123 | 82 | this.status = status; |
124 | 83 | } |
125 | 84 | |
126 | - /** | |
127 | - * 获取 门店描述 | |
128 | - * @return | |
129 | - */ | |
130 | - public String getDescription(){ | |
131 | - return description; | |
132 | - } | |
133 | - | |
134 | - /** | |
135 | - * 设置 门店描述 | |
136 | - * @param description | |
137 | - */ | |
138 | - public void setDescription(String description){ | |
139 | - this.description = description; | |
140 | - } | |
141 | - | |
142 | 85 | public Integer getIsSelfShop() { |
143 | 86 | return isSelfShop; |
144 | 87 | } |
... | ... | @@ -147,14 +90,6 @@ public class ShopDo extends BaseDo { |
147 | 90 | this.isSelfShop = isSelfShop; |
148 | 91 | } |
149 | 92 | |
150 | - public Integer getType() { | |
151 | - return type; | |
152 | - } | |
153 | - | |
154 | - public void setType(Integer type) { | |
155 | - this.type = type; | |
156 | - } | |
157 | - | |
158 | 93 | public String getMainBusiness() { |
159 | 94 | return mainBusiness; |
160 | 95 | } |
... | ... | @@ -162,4 +97,22 @@ public class ShopDo extends BaseDo { |
162 | 97 | public void setMainBusiness(String mainBusiness) { |
163 | 98 | this.mainBusiness = mainBusiness; |
164 | 99 | } |
100 | + | |
101 | + public String getAddress() { | |
102 | + return address; | |
103 | + } | |
104 | + | |
105 | + public void setAddress(String address) { | |
106 | + this.address = address; | |
107 | + } | |
108 | + | |
109 | + public String getDescription() { | |
110 | + return description; | |
111 | + } | |
112 | + | |
113 | + public void setDescription(String description) { | |
114 | + this.description = description; | |
115 | + } | |
116 | + | |
117 | + | |
165 | 118 | } |
166 | 119 | \ No newline at end of file | ... | ... |
src/main/resources/mapping/com/diligrp/xtrade/product/CategoryDao.xml
... | ... | @@ -5,12 +5,12 @@ |
5 | 5 | |
6 | 6 | <!-- etrade_product 所有查询列 --> |
7 | 7 | <sql id="QUERY_COLUMN_LIST"> |
8 | - <![CDATA[`id`, `category_id` AS categoryId, `cname`, `short_name` AS shortName, `status`, `level`, `type`, `icon`, `image`, `valid_day` AS validDay, `created_time` AS createdTime, `modified_time` AS modifiedTime, `market_id` AS marketId]]> | |
8 | + <![CDATA[`id`, `cate_id` AS cateId, `cname`, `short_name` AS shortName, `status`, `level`, `type`, `icon`, `image`, `valid_day` AS validDay, `created_time` AS createdTime, `modified_time` AS modifiedTime, `market_id` AS marketId]]> | |
9 | 9 | </sql> |
10 | 10 | <sql id="UPDATE_COLUMN_SET"> |
11 | 11 | <set> |
12 | 12 | <if test="cname != null"><![CDATA[cname = #{cname},]]></if> |
13 | - <if test="categoryId != null"><![CDATA[category_id = #{categoryId},]]></if> | |
13 | + <if test="categoryId != null"><![CDATA[cate_id = #{cateId},]]></if> | |
14 | 14 | <if test="status != null"><![CDATA[status = #{status},]]></if> |
15 | 15 | <if test="hasChild != null"><![CDATA[has_child = #{hasChild},]]></if> |
16 | 16 | <if test="shortName != null"><![CDATA[short_name = #{shortName},]]></if> |
... | ... | @@ -22,8 +22,8 @@ |
22 | 22 | </sql> |
23 | 23 | <insert id="insert" parameterType="com.diligrp.xtrade.product.domain.entity.CategoryDo"> |
24 | 24 | <![CDATA[ |
25 | - INSERT INTO `category`(`id`, `category_id`, `cname`, `short_name`, `status`, `level`, `type`, `icon`, `image`, `valid_day`, `created_time`, `modified_time`, `market_id`) VALUES | |
26 | - (#{id}, #{categoryId}, #{sname}, #{shortName}, #{status}, #{level}, #{type}, #{icon}, #{image}, #{validDay}, now(), now(), #{marketId}); | |
25 | + INSERT INTO `category`(`id`, `cate_id`, `cname`, `short_name`, `status`, `level`, `type`, `icon`, `image`, `valid_day`, `created_time`, `modified_time`, `market_id`) VALUES | |
26 | + (#{id}, #{cateId}, #{sname}, #{shortName}, #{status}, #{level}, #{type}, #{icon}, #{image}, #{validDay}, now(), now(), #{marketId}); | |
27 | 27 | ]]> |
28 | 28 | </insert> |
29 | 29 | <select id="selectEntityById" parameterType="long"> | ... | ... |