feature:修改优惠政策标识

release
gaorl 2 years ago
parent c97b036ef2
commit 67cf6050d3
  1. 3
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/commodity/service/impl/CommodityServiceImpl.java
  2. 2
      order-management-base-service/src/main/resources/mybatis/mapper/CommodityMapper.xml
  3. 7
      order-management-consumer/src/main/java/com/dxhy/order/consumer/modules/commodity/controller/GroupCommodityCodeController.java

@ -132,6 +132,9 @@ public class CommodityServiceImpl implements CommodityService {
if(commodityCodeModifyLogService.saveCommodityCodeDifferenceBetween2(commodityCodeEntities.get(0), codeEntity, userId) == -1){
return R.error().put(OrderManagementConstant.DATA, "数据未进行修改,无需保存");
}
if(StringUtils.isBlank(codeEntity.getYhzcbs())|| "0".equals(codeEntity.getYhzcbs())){
codeEntity.setZzstsgl("");
}
codeEntity.setXhfNsrsbh(null);//不更新税号
codeEntity.setModifyTime(new Date());
codeEntity.setCreateTime(null);

@ -300,7 +300,7 @@
<if test="commodityCode.lslbs != null and commodityCode.lslbs != ''">
preferential_policies_type = #{commodityCode.lslbs,jdbcType=VARCHAR},
</if>
<if test="commodityCode.zzstsgl != null and commodityCode.zzstsgl != ''">
<if test="commodityCode.zzstsgl != null">
zzstsgl = #{commodityCode.zzstsgl,jdbcType=VARCHAR},
</if>
<if test="commodityCode.userId != null and commodityCode.userId != ''">

@ -81,7 +81,12 @@ public class GroupCommodityCodeController {
@PostMapping("/sync")
public R sync(@RequestBody @Validated SyncGroupCommodityDTO dto) {
return groupCommodityCodeService.syncGroupCommodityDTO(dto);
try {
return groupCommodityCodeService.syncGroupCommodityDTO(dto);
} catch (Exception e) {
e.printStackTrace();
return R.error("系统异常,请联系管理员");
}
}
@RequestMapping("/uploadGroupCommodityDTO")

Loading…
Cancel
Save