Authored by gemingdan

update

@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 <if test="brand != null"> and brand = #{brand,jdbcType=INTEGER}</if> 43 <if test="brand != null"> and brand = #{brand,jdbcType=INTEGER}</if>
44 <if test="type != null"> and type = #{type,jdbcType=INTEGER}</if> 44 <if test="type != null"> and type = #{type,jdbcType=INTEGER}</if>
45 <if test="state != null"> and state = #{state,jdbcType=INTEGER}</if> 45 <if test="state != null"> and state = #{state,jdbcType=INTEGER}</if>
46 - limit {start},{size} 46 + limit #{start},#{size}
47 </select> 47 </select>
48 <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > 48 <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
49 delete from union_share_rebate_brand 49 delete from union_share_rebate_brand
@@ -62,9 +62,6 @@ @@ -62,9 +62,6 @@
62 <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.yoho.unions.dal.model.UnionShareRebateBrand" > 62 <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.yoho.unions.dal.model.UnionShareRebateBrand" >
63 insert into union_share_rebate_brand 63 insert into union_share_rebate_brand
64 <trim prefix="(" suffix=")" suffixOverrides="," > 64 <trim prefix="(" suffix=")" suffixOverrides="," >
65 - <if test="id != null" >  
66 - id,  
67 - </if>  
68 <if test="brand != null" > 65 <if test="brand != null" >
69 brand, 66 brand,
70 </if> 67 </if>
@@ -91,9 +88,6 @@ @@ -91,9 +88,6 @@
91 </if> 88 </if>
92 </trim> 89 </trim>
93 <trim prefix="values (" suffix=")" suffixOverrides="," > 90 <trim prefix="values (" suffix=")" suffixOverrides="," >
94 - <if test="id != null" >  
95 - #{id,jdbcType=INTEGER},  
96 - </if>  
97 <if test="brand != null" > 91 <if test="brand != null" >
98 #{brand,jdbcType=INTEGER}, 92 #{brand,jdbcType=INTEGER},
99 </if> 93 </if>
@@ -123,9 +117,6 @@ @@ -123,9 +117,6 @@
123 <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.UnionShareRebateBrand" > 117 <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.UnionShareRebateBrand" >
124 update union_share_rebate_brand 118 update union_share_rebate_brand
125 <set > 119 <set >
126 - <if test="brand != null" >  
127 - brand = #{brand,jdbcType=INTEGER},  
128 - </if>  
129 <if test="name != null" > 120 <if test="name != null" >
130 name = #{name,jdbcType=VARCHAR}, 121 name = #{name,jdbcType=VARCHAR},
131 </if> 122 </if>
@@ -153,9 +144,6 @@ @@ -153,9 +144,6 @@
153 <update id="updateWithLogid" parameterType="com.yoho.unions.dal.model.UnionShareRebateBrand" > 144 <update id="updateWithLogid" parameterType="com.yoho.unions.dal.model.UnionShareRebateBrand" >
154 update union_share_rebate_brand 145 update union_share_rebate_brand
155 <set > 146 <set >
156 - <if test="brand != null" >  
157 - brand = #{brand,jdbcType=INTEGER},  
158 - </if>  
159 <if test="name != null" > 147 <if test="name != null" >
160 name = #{name,jdbcType=VARCHAR}, 148 name = #{name,jdbcType=VARCHAR},
161 </if> 149 </if>
@@ -179,7 +167,7 @@ @@ -179,7 +167,7 @@
179 </update> 167 </update>
180 <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.UnionShareRebateBrand" > 168 <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.UnionShareRebateBrand" >
181 update union_share_rebate_brand 169 update union_share_rebate_brand
182 - set brand = #{brand,jdbcType=INTEGER}, 170 + set
183 name = #{name,jdbcType=VARCHAR}, 171 name = #{name,jdbcType=VARCHAR},
184 type = #{type,jdbcType=INTEGER}, 172 type = #{type,jdbcType=INTEGER},
185 state = #{state,jdbcType=INTEGER}, 173 state = #{state,jdbcType=INTEGER},
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 <if test="brand != null"> and brand = #{brand,jdbcType=INTEGER}</if> 46 <if test="brand != null"> and brand = #{brand,jdbcType=INTEGER}</if>
47 <if test="type != null"> and type = #{type,jdbcType=INTEGER}</if> 47 <if test="type != null"> and type = #{type,jdbcType=INTEGER}</if>
48 <if test="state != null"> and state = #{state,jdbcType=INTEGER}</if> 48 <if test="state != null"> and state = #{state,jdbcType=INTEGER}</if>
49 - limit {start},{size} 49 + limit #{start},#{size}
50 </select> 50 </select>
51 <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > 51 <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
52 delete from union_share_rebate_skn 52 delete from union_share_rebate_skn
@@ -65,9 +65,6 @@ @@ -65,9 +65,6 @@
65 <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.yoho.unions.dal.model.UnionShareRebateSkn" > 65 <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.yoho.unions.dal.model.UnionShareRebateSkn" >
66 insert into union_share_rebate_skn 66 insert into union_share_rebate_skn
67 <trim prefix="(" suffix=")" suffixOverrides="," > 67 <trim prefix="(" suffix=")" suffixOverrides="," >
68 - <if test="id != null" >  
69 - id,  
70 - </if>  
71 <if test="skn != null" > 68 <if test="skn != null" >
72 skn, 69 skn,
73 </if> 70 </if>
@@ -97,9 +94,6 @@ @@ -97,9 +94,6 @@
97 </if> 94 </if>
98 </trim> 95 </trim>
99 <trim prefix="values (" suffix=")" suffixOverrides="," > 96 <trim prefix="values (" suffix=")" suffixOverrides="," >
100 - <if test="id != null" >  
101 - #{id,jdbcType=INTEGER},  
102 - </if>  
103 <if test="skn != null" > 97 <if test="skn != null" >
104 #{skn,jdbcType=INTEGER}, 98 #{skn,jdbcType=INTEGER},
105 </if> 99 </if>
@@ -132,9 +126,6 @@ @@ -132,9 +126,6 @@
132 <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.UnionShareRebateSkn" > 126 <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.UnionShareRebateSkn" >
133 update union_share_rebate_skn 127 update union_share_rebate_skn
134 <set > 128 <set >
135 - <if test="skn != null" >  
136 - skn = #{skn,jdbcType=INTEGER},  
137 - </if>  
138 <if test="brand != null" > 129 <if test="brand != null" >
139 brand = #{brand,jdbcType=INTEGER}, 130 brand = #{brand,jdbcType=INTEGER},
140 </if> 131 </if>
@@ -165,9 +156,6 @@ @@ -165,9 +156,6 @@
165 <update id="updateWithLogid" parameterType="com.yoho.unions.dal.model.UnionShareRebateSkn" > 156 <update id="updateWithLogid" parameterType="com.yoho.unions.dal.model.UnionShareRebateSkn" >
166 update union_share_rebate_skn 157 update union_share_rebate_skn
167 <set > 158 <set >
168 - <if test="skn != null" >  
169 - skn = #{skn,jdbcType=INTEGER},  
170 - </if>  
171 <if test="brand != null" > 159 <if test="brand != null" >
172 brand = #{brand,jdbcType=INTEGER}, 160 brand = #{brand,jdbcType=INTEGER},
173 </if> 161 </if>
@@ -197,7 +185,7 @@ @@ -197,7 +185,7 @@
197 </update> 185 </update>
198 <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.UnionShareRebateSkn" > 186 <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.UnionShareRebateSkn" >
199 update union_share_rebate_skn 187 update union_share_rebate_skn
200 - set skn = #{skn,jdbcType=INTEGER}, 188 + set
201 brand = #{brand,jdbcType=INTEGER}, 189 brand = #{brand,jdbcType=INTEGER},
202 name = #{name,jdbcType=VARCHAR}, 190 name = #{name,jdbcType=VARCHAR},
203 rebate = #{rebate,jdbcType=INTEGER}, 191 rebate = #{rebate,jdbcType=INTEGER},
@@ -323,9 +323,11 @@ public class UnionShareRebateServiceImpl implements IUnionShareRebateService,IBu @@ -323,9 +323,11 @@ public class UnionShareRebateServiceImpl implements IUnionShareRebateService,IBu
323 } 323 }
324 324
325 private Map<Integer, BrandBo> gerBrandInfoMap(List<Integer> brands){ 325 private Map<Integer, BrandBo> gerBrandInfoMap(List<Integer> brands){
  326 + logger.info("gerBrandInfoMap start.brands is {}",brands);
326 BatchBaseRequest<Integer> req = new BatchBaseRequest<Integer>(); 327 BatchBaseRequest<Integer> req = new BatchBaseRequest<Integer>();
327 req.setParams(brands); 328 req.setParams(brands);
328 BrandBo[] boArr = serviceCaller.call("product.queryBrandByIds", req, BrandBo[].class); 329 BrandBo[] boArr = serviceCaller.call("product.queryBrandByIds", req, BrandBo[].class);
  330 + logger.info("gerBrandInfoMap start.call product.queryBrandByIds,brands is {},boArr is {},size is {}",brands,boArr,boArr.length);
329 Map<Integer, BrandBo> boMap = new HashMap<>(); 331 Map<Integer, BrandBo> boMap = new HashMap<>();
330 for (int i = 0; i < boArr.length; i++) { 332 for (int i = 0; i < boArr.length; i++) {
331 boMap.put(boArr[i].getId(), boArr[i]); 333 boMap.put(boArr[i].getId(), boArr[i]);
@@ -333,13 +335,17 @@ public class UnionShareRebateServiceImpl implements IUnionShareRebateService,IBu @@ -333,13 +335,17 @@ public class UnionShareRebateServiceImpl implements IUnionShareRebateService,IBu
333 return boMap; 335 return boMap;
334 } 336 }
335 private Map<Integer, ProductBo> gerProductInfoMap(List<Integer> skns){ 337 private Map<Integer, ProductBo> gerProductInfoMap(List<Integer> skns){
  338 + logger.info("gerProductInfoMap start.skns is {}",skns);
336 BatchBaseRequest<Integer> req = new BatchBaseRequest<Integer>(); 339 BatchBaseRequest<Integer> req = new BatchBaseRequest<Integer>();
337 req.setParams(skns); 340 req.setParams(skns);
338 - ProductBo[] boArr = serviceCaller.call("product.batchQueryProductsForUnion", req, ProductBo[].class);  
339 - Map<Integer, ProductBo> boMap = new HashMap<>();  
340 - for (int i = 0; i < boArr.length; i++) {  
341 - boMap.put(boArr[i].getErpProductId(), boArr[i]); 341 + ProductBo[] productArr = serviceCaller.call("product.batchQueryProductsForUnion", req, ProductBo[].class);
  342 + logger.info("gerProductInfoMap start.call product.batchQueryProductsForUnion,skns is {},productArr is {},size is {}",skns,productArr,productArr.length);
  343 + Map<Integer, ProductBo> productMap = new HashMap<>();
  344 + for (int i = 0; i < productArr.length; i++) {
  345 + productMap.put(productArr[i].getErpProductId(), productArr[i]);
  346 + logger.info("gerProductInfoMap . {},product is {}}",skns,productArr,productArr.length);
  347 +
342 } 348 }
343 - return boMap; 349 + return productMap;
344 } 350 }
345 } 351 }