| @@ -77,8 +77,8 @@ public class WxBrandController extends BaseController { | |||||
| return new ResultData(Result.ERROR, "您有未解绑的商户,请先解绑。"); | return new ResultData(Result.ERROR, "您有未解绑的商户,请先解绑。"); | ||||
| } | } | ||||
| } | } | ||||
| return wxBrandService.update(wxBrand); | |||||
| wxBrandService.update(wxBrand); | |||||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||||
| } | } | ||||
| @GetMapping("/del") | @GetMapping("/del") | ||||
| @@ -69,6 +69,12 @@ public class WxBrandServiceImpl implements WxBrandService { | |||||
| @Override | @Override | ||||
| public ResultData update(WxBrand wxBrand) { | public ResultData update(WxBrand wxBrand) { | ||||
| if(wxBrand.getIsDel().equals(1)){ | |||||
| wxBrand.setUpdatetime(new Date()); | |||||
| wxBrandMapper.updateByPrimaryKeySelective(wxBrand); | |||||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||||
| } | |||||
| if(StringUtils.isEmpty(wxBrand.getName())){ | if(StringUtils.isEmpty(wxBrand.getName())){ | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"品牌名称不能为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL,"品牌名称不能为空"); | ||||
| } | } | ||||
| @@ -104,6 +104,9 @@ | |||||
| <if test=" null != isDel "> | <if test=" null != isDel "> | ||||
| and `is_del` = #{isDel} | and `is_del` = #{isDel} | ||||
| </if> | </if> | ||||
| <if test=" null != brand "> | |||||
| and `brand` = #{brand} | |||||
| </if> | |||||
| <if test=" null != rentShopType "> | <if test=" null != rentShopType "> | ||||
| and id not in( | and id not in( | ||||
| select merchant_id from wx_rent_contract where tenant_id=#{tenantId} and rent_shop_type=1 and merchant_id is | select merchant_id from wx_rent_contract where tenant_id=#{tenantId} and rent_shop_type=1 and merchant_id is | ||||