| | |
| | | import cn.afterturn.easypoi.excel.ExcelImportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.ExportParams; |
| | | import cn.afterturn.easypoi.excel.entity.ImportParams; |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | if (dto.getState() == 1 && goods.getClinicPurchasePrice() == null) { |
| | | return R.fail("操作失败,请设置供应商分佣比例后再启用"); |
| | | } |
| | | if (dto.getState() == 1 && goods.getStateUser() == 1 && user.getRoleType() == 5) { |
| | | if (dto.getState() == 1 && goods.getStateUser() == 1 && user.getRoleType() == 4) { |
| | | return R.fail("操作失败,平台禁用商品不可启用"); |
| | | } |
| | | if (user.getRoleType() == 1) { |
| | |
| | | goods.setState(dto.getState()); |
| | | boolean b = erpGoodsService.updateById(goods); |
| | | return R.ok(b); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | String s = SecureUtil.md5("cca19Broker@.!142536cca"); |
| | | System.out.println(s); |
| | | } |
| | | |
| | | @ApiOperation(value = "供应商完善商品") |
| | |
| | | TErpGoods goods = erpGoodsService.getById(dto.getId()); |
| | | goods.setClinicPurchasePrice(BigDecimal.valueOf(dto.getClinicPurchasePrice()).setScale(2, RoundingMode.HALF_UP)); |
| | | goods.setPlatformCommissionPrice(BigDecimal.valueOf(dto.getPlatformCommissionPrice()).setScale(2, RoundingMode.HALF_UP)); |
| | | goods.setRetailPrice(dto.getRetailPrice()); |
| | | goods.setSalesAmount(dto.getRetailPrice()); |
| | | erpGoodsService.updateById(goods); |
| | | } |
| | | return R.ok(); |