server/company/src/main/java/com/doumee/api/business/CategoryController.java
@@ -13,6 +13,7 @@ import com.doumee.dao.business.model.BaseCateParam; import com.doumee.dao.business.model.BaseCategory; import com.doumee.dao.business.model.Category; import com.doumee.service.CateParamSelectService; import com.doumee.service.business.BaseCateParamService; import com.doumee.service.business.BaseCategoryService; import com.doumee.service.business.CategoryService; @@ -45,6 +46,8 @@ @Autowired private BaseCateParamService baseCateParamService; @Autowired private CateParamSelectService cateParamSelectService; @PreventRepeat @ApiOperation("æ°å»º") @@ -97,6 +100,7 @@ @RequiresPermissions("business:category:update") public ApiResponse companyUpdateById(@RequestBody Category category) { categoryService.companyUpdateById(category); cateParamSelectService.dealCateParamSelect(); return ApiResponse.success(null); } @@ -156,7 +160,6 @@ BaseCategory baseCategory = new BaseCategory(); baseCategory.setIsdeleted(Constants.ZERO); baseCategory.setStatus(Constants.ZERO); baseCategoryService.findList(baseCategory); List list = baseCategoryService.findList(baseCategory); return ApiResponse.success(list); } server/company/src/main/java/com/doumee/api/business/GoodsController.java
@@ -13,6 +13,7 @@ import com.doumee.service.CateParamSelectService; import com.doumee.service.business.GoodsService; import io.swagger.annotations.*; import lombok.extern.java.Log; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -56,7 +57,7 @@ // @RequiresPermissions("business:goods:create") public ApiResponse companyCreate(@RequestBody Goods goods) { goodsService.companyCreate(goods); cateParamSelectService.dealGroupVals(goods.getCompanyId()); cateParamSelectService.dealCateParamSelect(); return ApiResponse.success("æä½æå"); } @@ -65,7 +66,9 @@ @PostMapping("/createPlat") @RequiresPermissions("business:goods:create") public ApiResponse createPlat(@RequestBody GoodCreatePlatRequest param) { return ApiResponse.success(goodsService.createPlat(param)); goodsService.createPlat(param); cateParamSelectService.dealCateParamSelect(); return ApiResponse.success("æä½æå"); } @ApiOperation("æ ¹æ®IDå é¤") @@ -73,6 +76,7 @@ @RequiresPermissions("business:goods:delete") public ApiResponse deleteById(@PathVariable Integer id) { goodsService.deleteById(id); cateParamSelectService.dealCateParamSelect(); return ApiResponse.success(null); } @@ -86,6 +90,7 @@ idList.add(Integer.valueOf(id)); } goodsService.deleteByIdInBatch(idList); cateParamSelectService.dealCateParamSelect(); return ApiResponse.success(null); } @@ -102,6 +107,7 @@ @RequiresPermissions("business:goods:update") public ApiResponse companyUpdateById(@RequestBody Goods goods) { goodsService.companyUpdateById(goods); cateParamSelectService.dealCateParamSelect(); return ApiResponse.success(null); } @@ -135,7 +141,9 @@ }) // @RequiresPermissions("business:goods:create") public ApiResponse<Integer> importExcel (@ApiParam(value = "file") MultipartFile file) { return ApiResponse.success(goodsService.importBatch(file)); Integer val = goodsService.importBatch(file); cateParamSelectService.dealCateParamSelect(); return ApiResponse.success(val); } server/company/src/main/java/com/doumee/config/shiro/ShiroRealm.java
@@ -4,9 +4,12 @@ import com.doumee.core.exception.BusinessException; import com.doumee.core.model.LoginUserInfo; import com.doumee.core.utils.Constants; import com.doumee.core.utils.DateUtil; import com.doumee.dao.business.model.Company; import com.doumee.dao.system.model.SystemPermission; import com.doumee.dao.system.model.SystemRole; import com.doumee.dao.system.model.SystemUser; import com.doumee.service.business.CompanyService; import com.doumee.service.system.SystemDataPermissionService; import com.doumee.service.system.SystemPermissionService; import com.doumee.service.system.SystemRoleService; @@ -23,6 +26,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import java.util.Date; import java.util.List; /** @@ -47,6 +51,10 @@ @Lazy @Autowired private SystemPermissionService systemPermissionService; @Lazy @Autowired private CompanyService companyService; /** * æéå¤ç @@ -86,6 +94,15 @@ if(!Constants.equalsInteger(user.getStatus(),Constants.ZERO)){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼è´¦å·ä¿¡æ¯å·²è¢«ç¦ç¨ï¼å¦æçé®è¯·è系系ç»ç®¡çåï¼"); } if(!user.getType().equals(Constants.UserType.SYSTEM)){ Company company = companyService.findById(user.getCompanyId()); if(company.getStatus().equals(Constants.ONE)){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼ä¼ä¸ä¿¡æ¯å·²è¢«ç¦ç¨ï¼å¦æçé®è¯·è系系ç»ç®¡çåï¼"); } if(DateUtil.compareDate(new Date(),DateUtil.addDaysToDate(company.getOepnValidDate(),1))<=Constants.ZERO){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼ä¼ä¸ä¿¡æ¯å·²è¿æï¼å¦æçé®è¯·è系系ç»ç®¡çåï¼"); } } // è·åç»å½ç¨æ·ä¿¡æ¯ List<SystemRole> roles = systemRoleService.findByUserId(user.getId()); server/service/src/main/java/com/doumee/biz/system/impl/SystemUserBizImpl.java
@@ -7,11 +7,13 @@ import com.doumee.core.model.LoginUserInfo; import com.doumee.core.utils.Constants; import com.doumee.core.utils.Utils; import com.doumee.dao.business.model.Company; import com.doumee.dao.system.dto.*; import com.doumee.dao.system.model.SystemDepartment; import com.doumee.dao.system.model.SystemDepartmentUser; import com.doumee.dao.system.model.SystemUser; import com.doumee.dao.system.model.SystemUserRole; import com.doumee.service.business.CompanyService; import com.doumee.service.system.*; import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; @@ -32,6 +34,9 @@ @Autowired private SystemUserService systemUserService; @Autowired private CompanyService companyService; @Autowired private SystemUserRoleService systemUserRoleService; @@ -247,6 +252,16 @@ if (user != null) { throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "ç¨æ·åå·²åå¨"); } if(createCompanyUserDTO.getType().equals(Constants.UserType.ZHUBO.getKey())){ Company company = companyService.findById(loginUserInfo.getCompanyId()); SystemUser zbUserNum = new SystemUser(); zbUserNum.setCompanyId(loginUserInfo.getCompanyId()); zbUserNum.setDeleted(Boolean.FALSE); zbUserNum.setType(Constants.UserType.ZHUBO.getKey()); if(systemUserService.findList(zbUserNum).size()>=company.getUserNum()){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼å·²è¶ åºä¼ä¸å¯åé ä¸»ææ°éï¼å¦æçé®è¯·è系系ç»ç®¡çåï¼"); } } SystemUser systemUser = new SystemUser(); BeanUtils.copyProperties(createCompanyUserDTO,systemUser); systemUser.setCompanyId(loginUserInfo.getCompanyId()); server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -29,6 +29,7 @@ public static final String TOP_IMG = "TOP_IMG"; public static final String PK_IMG = "PK_IMG"; public static final String RANGE_SIZE = "RANGE_SIZE"; public static final String CATE_PARAM_OPEN = "_CATE_PARAM_OPEN"; public static final String SYSTEM ="SYSTEM"; server/service/src/main/java/com/doumee/dao/business/CateParamSelectMapper.java
@@ -3,10 +3,14 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.doumee.dao.business.model.CateParamSelect; import java.util.List; /** * @author æ±è¹è¹ * @date 2023/09/11 14:45 */ public interface CateParamSelectMapper extends BaseMapper<CateParamSelect> { void insertBatch(Integer companyId,Integer userId); } server/service/src/main/java/com/doumee/service/CateParamSelectService.java
@@ -1,5 +1,6 @@ package com.doumee.service; import com.doumee.core.model.LoginUserInfo; import com.doumee.core.model.PageData; import com.doumee.core.model.PageWrap; import com.doumee.dao.business.model.CateParamSelect; @@ -96,5 +97,5 @@ */ long count(CateParamSelect cateParamSelect); void dealGroupVals(Integer companyId); void dealCateParamSelect(); } server/service/src/main/java/com/doumee/service/business/impl/BaseCategoryServiceImpl.java
@@ -257,8 +257,9 @@ @Override public List<BaseCategory> findList(BaseCategory baseCategory) { baseCategory.setIsdeleted(Constants.ZERO); QueryWrapper<BaseCategory> wrapper = new QueryWrapper<>(baseCategory); wrapper.eq("ISDELETED",Constants.ZERO); wrapper.eq("STATUS",Constants.ZERO); List<BaseCategory> list = baseCategoryMapper.selectList(wrapper); list.forEach(i->{ if(StringUtils.isNotBlank(i.getImgurl())){ server/service/src/main/java/com/doumee/service/business/impl/BrandServiceImpl.java
@@ -159,7 +159,7 @@ wrapper.lambda().eq(Brand::getType,Constants.ONE); }else { wrapper.lambda().and(i->i.eq(Brand::getCompanyId,user.getCompanyId()) .or().eq(Brand::getType,Constants.ZERO) .or().eq(Brand::getType,Constants.ONE) ); } List<Brand> list = brandMapper.selectList(wrapper); @@ -186,6 +186,9 @@ if (pageWrap.getModel().getStatus() != null) { queryWrapper.lambda().eq(Brand::getStatus, pageWrap.getModel().getStatus()); } if (pageWrap.getModel().getType() != null) { queryWrapper.lambda().eq(Brand::getType, pageWrap.getModel().getType()); } // ç±»å 0ä¼ä¸ 1å¹³å° if (Objects.isNull(user.getCompanyId())) { queryWrapper.lambda().eq(Brand::getType,Constants.ONE); server/service/src/main/java/com/doumee/service/business/impl/CategoryServiceImpl.java
@@ -279,7 +279,8 @@ @Override public void companyUpdateById(Category category) { LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); if(categoryMapper.selectCount(new QueryWrapper<Category>().eq("ISDELETED",Constants.ZERO).ne("id",category.getId()).eq("name",category.getName()))>0){ if(categoryMapper.selectCount(new QueryWrapper<Category>().eq("ISDELETED",Constants.ZERO).eq("COMPANY_ID",user.getCompanyId()) .ne("id",category.getId()).eq("name",category.getName()))>0){ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ã"+category.getName()+"ãå·²åå¨"); }; category.setStatus(Constants.ZERO); @@ -489,9 +490,11 @@ @Override public List<Category> findListForGoods(Integer goodsId) { LoginUserInfo loginUserInfo = (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); QueryWrapper<Category> wrapper = new QueryWrapper<Category>() .eq("STATUS",Constants.ZERO) .eq("ISDELETED",Constants.ZERO) .eq("COMPANY_ID",loginUserInfo.getCompanyId()) .orderByAsc(" SORTNUM "); List<Category> list = categoryMapper.selectList(wrapper); String prefixUrl = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() @@ -521,6 +524,9 @@ if (pageWrap.getModel().getStatus() != null) { queryWrapper.lambda().eq(Category::getStatus, pageWrap.getModel().getStatus()); } if (pageWrap.getModel().getType() != null) { queryWrapper.lambda().eq(Category::getType, pageWrap.getModel().getType()); } if (pageWrap.getModel().getCompanyId() != null) { queryWrapper.lambda().eq(Category::getCompanyId, pageWrap.getModel().getCompanyId()); } server/service/src/main/java/com/doumee/service/business/impl/GoodsServiceImpl.java
@@ -223,19 +223,19 @@ goodsParamMapper.insert(goodsParam); //åå¨ cate_param_select æ¥è¯¢æ¯å¦å·²åå¨ if(cateParamSelectMapper.selectCount(new QueryWrapper<CateParamSelect>() .eq("PARAM_ID",goodsParam.getPramaId()).eq("NAME",goodsParam.getName()))<=Constants.ZERO){ CateParamSelect cateParamSelect = new CateParamSelect(); cateParamSelect.setCreator(user.getId()); cateParamSelect.setCreateDate(new Date()); cateParamSelect.setName(goodsParam.getVal()); cateParamSelect.setIsdeleted(Constants.ZERO); cateParamSelect.setStatus(Constants.ZERO); cateParamSelect.setParamId(goodsParam.getPramaId()); cateParamSelect.setCategoryId(goods.getCategoryId()); cateParamSelect.setStatus(Constants.ZERO); cateParamSelectMapper.insert(cateParamSelect); }; // if(cateParamSelectMapper.selectCount(new QueryWrapper<CateParamSelect>() // .eq("PARAM_ID",goodsParam.getPramaId()).eq("NAME",goodsParam.getName()))<=Constants.ZERO){ // CateParamSelect cateParamSelect = new CateParamSelect(); // cateParamSelect.setCreator(user.getId()); // cateParamSelect.setCreateDate(new Date()); // cateParamSelect.setName(goodsParam.getVal()); // cateParamSelect.setIsdeleted(Constants.ZERO); // cateParamSelect.setStatus(Constants.ZERO); // cateParamSelect.setParamId(goodsParam.getPramaId()); // cateParamSelect.setCategoryId(goods.getCategoryId()); // cateParamSelect.setStatus(Constants.ZERO); // cateParamSelectMapper.insert(cateParamSelect); // }; } } @@ -360,19 +360,19 @@ goodsParam.setGoodsId(goods.getId()); goodsParamMapper.insert(goodsParam); //åå¨ cate_param_select æ¥è¯¢æ¯å¦å·²åå¨ if(cateParamSelectMapper.selectCount(new QueryWrapper<CateParamSelect>() .eq("PARAM_ID",goodsParam.getPramaId()).eq("NAME",goodsParam.getName()))<=Constants.ZERO){ CateParamSelect cateParamSelect = new CateParamSelect(); cateParamSelect.setCreator(user.getId()); cateParamSelect.setCreateDate(new Date()); cateParamSelect.setName(goodsParam.getVal()); cateParamSelect.setIsdeleted(Constants.ZERO); cateParamSelect.setStatus(Constants.ZERO); cateParamSelect.setParamId(goodsParam.getPramaId()); cateParamSelect.setCategoryId(goods.getCategoryId()); cateParamSelect.setStatus(Constants.ZERO); cateParamSelectMapper.insert(cateParamSelect); }; // if(cateParamSelectMapper.selectCount(new QueryWrapper<CateParamSelect>() // .eq("PARAM_ID",goodsParam.getPramaId()).eq("NAME",goodsParam.getName()))<=Constants.ZERO){ // CateParamSelect cateParamSelect = new CateParamSelect(); // cateParamSelect.setCreator(user.getId()); // cateParamSelect.setCreateDate(new Date()); // cateParamSelect.setName(goodsParam.getVal()); // cateParamSelect.setIsdeleted(Constants.ZERO); // cateParamSelect.setStatus(Constants.ZERO); // cateParamSelect.setParamId(goodsParam.getPramaId()); // cateParamSelect.setCategoryId(goods.getCategoryId()); // cateParamSelect.setStatus(Constants.ZERO); // cateParamSelectMapper.insert(cateParamSelect); // }; } } return goods.getId(); @@ -469,7 +469,8 @@ goods.setShortPinyin(PinYinUtil.getFirstSpell(goods.getName())); goodsMapper.updateById(goods); multifileMapper.delete(new QueryWrapper<Multifile>().eq("OBJ_ID",goods.getId())); multifileMapper.delete(new QueryWrapper<Multifile>().eq("OBJ_ID",goods.getId()) .eq("OBJ_TYPE",0).eq("COMPANY_ID",user.getCompanyId())); List<Multifile> multifileList = goods.getMultifileList(); if(!Objects.isNull(multifileList)&&multifileList.size()>Constants.ZERO){ for (int i = 0; i < multifileList.size(); i++) { @@ -497,19 +498,19 @@ goodsParam.setGoodsId(goods.getId()); goodsParamMapper.insert(goodsParam); //åå¨ cate_param_select æ¥è¯¢æ¯å¦å·²åå¨ if(cateParamSelectMapper.selectCount(new QueryWrapper<CateParamSelect>() .eq("PARAM_ID",goodsParam.getPramaId()).eq("NAME",goodsParam.getName()))<=Constants.ZERO){ CateParamSelect cateParamSelect = new CateParamSelect(); cateParamSelect.setCreator(user.getId()); cateParamSelect.setCreateDate(new Date()); cateParamSelect.setName(goodsParam.getVal()); cateParamSelect.setIsdeleted(Constants.ZERO); cateParamSelect.setStatus(Constants.ZERO); cateParamSelect.setParamId(goodsParam.getPramaId()); cateParamSelect.setCategoryId(goods.getCategoryId()); cateParamSelect.setStatus(Constants.ZERO); cateParamSelectMapper.insert(cateParamSelect); }; // if(cateParamSelectMapper.selectCount(new QueryWrapper<CateParamSelect>() // .eq("PARAM_ID",goodsParam.getPramaId()).eq("NAME",goodsParam.getName()))<=Constants.ZERO){ // CateParamSelect cateParamSelect = new CateParamSelect(); // cateParamSelect.setCreator(user.getId()); // cateParamSelect.setCreateDate(new Date()); // cateParamSelect.setName(goodsParam.getVal()); // cateParamSelect.setIsdeleted(Constants.ZERO); // cateParamSelect.setStatus(Constants.ZERO); // cateParamSelect.setParamId(goodsParam.getPramaId()); // cateParamSelect.setCategoryId(goods.getCategoryId()); // cateParamSelect.setStatus(Constants.ZERO); // cateParamSelectMapper.insert(cateParamSelect); // }; } } } @@ -677,7 +678,9 @@ if (pageWrap.getModel().getStatus() != null) { queryWrapper.eq(Goods::getStatus, pageWrap.getModel().getStatus()); } if (pageWrap.getModel().getType() != null) { queryWrapper.eq(Goods::getType, pageWrap.getModel().getType()); } if (pageWrap.getModel().getCategoryId() != null) { queryWrapper.eq(Goods::getCategoryId, pageWrap.getModel().getCategoryId()); } @@ -693,10 +696,6 @@ + systemDictDataBiz.queryByCode(Constants.OSS, Constants.GOODS_IMG).getCode(); goodsIPage.getRecords().forEach(i->{ i.setPrefixUrl(prefixUrl); if(i.getType().equals(Constants.ONE)){ i.setBasePrice(i.getBasePrice().multiply(i.getBasePriceRate())); } }); return PageData.from(goodsIPage); } @@ -875,19 +874,19 @@ //æå ¥äº§ååæ°å ³è表 goodsParamMapper.insert(gp); //åå¨ cate_param_select æ¥è¯¢æ¯å¦å·²åå¨ if(cateParamSelectMapper.selectCount(new QueryWrapper<CateParamSelect>() .eq("PARAM_ID",gp.getPramaId()).eq("NAME",gp.getName()))<=Constants.ZERO){ CateParamSelect cateParamSelect = new CateParamSelect(); cateParamSelect.setCreator(user.getId()); cateParamSelect.setCreateDate(new Date()); cateParamSelect.setName(gp.getVal()); cateParamSelect.setIsdeleted(Constants.ZERO); cateParamSelect.setStatus(Constants.ZERO); cateParamSelect.setParamId(gp.getPramaId()); cateParamSelect.setCategoryId(newModel.getCategoryId()); cateParamSelect.setStatus(Constants.ZERO); cateParamSelectMapper.insert(cateParamSelect); }; // if(cateParamSelectMapper.selectCount(new QueryWrapper<CateParamSelect>() // .eq("PARAM_ID",gp.getPramaId()).eq("NAME",gp.getName()))<=Constants.ZERO){ // CateParamSelect cateParamSelect = new CateParamSelect(); // cateParamSelect.setCreator(user.getId()); // cateParamSelect.setCreateDate(new Date()); // cateParamSelect.setName(gp.getVal()); // cateParamSelect.setIsdeleted(Constants.ZERO); // cateParamSelect.setStatus(Constants.ZERO); // cateParamSelect.setParamId(gp.getPramaId()); // cateParamSelect.setCategoryId(newModel.getCategoryId()); // cateParamSelect.setStatus(Constants.ZERO); // cateParamSelectMapper.insert(cateParamSelect); // }; } } if(mulFiles !=null && mulFiles.size()>0){ server/service/src/main/java/com/doumee/service/impl/CateParamSelectServiceImpl.java
@@ -4,12 +4,15 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.doumee.core.model.LoginUserInfo; import com.doumee.core.model.PageData; import com.doumee.core.model.PageWrap; import com.doumee.core.utils.Constants; import com.doumee.core.utils.Utils; import com.doumee.dao.business.CateParamSelectMapper; import com.doumee.dao.business.model.CateParamSelect; import com.doumee.service.CateParamSelectService; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.scheduling.annotation.Async; @@ -28,6 +31,7 @@ @Autowired private RedisTemplate redisTemplate; @Autowired private CateParamSelectMapper cateParamSelectMapper; @@ -149,19 +153,22 @@ @Override @Async public void dealGroupVals(Integer companyId) { Boolean isGrouping = (Boolean)redisTemplate.opsForValue().get(companyId+"_isGrouping"); public void dealCateParamSelect() { LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); Boolean isGrouping = (Boolean)redisTemplate.opsForValue().get(loginUserInfo.getCompanyId()+Constants.CATE_PARAM_OPEN); if(isGrouping!=null && isGrouping ){ return; } redisTemplate.opsForValue().set(companyId+"_isGrouping",true); redisTemplate.opsForValue().set(loginUserInfo.getCompanyId()+Constants.CATE_PARAM_OPEN,true); try { //---------TODO-------任康 //å é¤ä¼ä¸ä¸å岿°æ® cateParamSelectMapper.delete(new QueryWrapper<CateParamSelect>().exists(" select 1 from category c where c.id = cate_param_select.category_id and c.company_id = "+loginUserInfo.getCompanyId()+" ")); //æ°å¢å½åä¼ä¸å¯ä»¥ä½¿ç¨çæ°æ® cateParamSelectMapper.insertBatch(loginUserInfo.getCompanyId(),loginUserInfo.getId()); }catch (Exception e){ }finally { redisTemplate.opsForValue().set(companyId+"_isGrouping",false); redisTemplate.opsForValue().set(loginUserInfo.getCompanyId()+Constants.CATE_PARAM_OPEN,false); } } } server/service/src/main/java/com/doumee/service/system/impl/SystemLoginServiceImpl.java
@@ -1,5 +1,6 @@ package com.doumee.service.system.impl; import com.baomidou.mybatisplus.extension.api.R; import com.doumee.core.constants.ResponseStatus; import com.doumee.core.exception.BusinessException; import com.doumee.core.model.LoginUserInfo; @@ -21,6 +22,7 @@ import javax.servlet.http.HttpServletRequest; import java.util.Date; import java.util.Objects; @Slf4j @Service @@ -77,7 +79,7 @@ loginLog.setReason(e.getMessage().length() > 200 ? (e.getMessage().substring(0, 190) + "...") : e.getMessage()); loginLog.setSuccess(Boolean.FALSE); systemLoginLogService.create(loginLog); throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT); throw new BusinessException(ResponseStatus.ACCOUNT_INCORRECT.getCode(), Objects.isNull(e.getCause())?ResponseStatus.ACCOUNT_INCORRECT.getMessage():e.getCause().getMessage()); } } } server/service/src/main/resources/mappers/CateParamSelectMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,19 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.doumee.dao.business.CateParamSelectMapper"> <insert id="insertBatch" > INSERT INTO `cate_param_select` (`CREATOR`, `CREATE_DATE`, `EDITOR`, `EDIT_DATE`, `ISDELETED`, `REMARK`, `NAME`, `PARAM_ID`, `CATEGORY_ID`, `STATUS`, `SORTNUM`) select #{userId} , now(),null , null , 0 , null , a.VAL , a.PRAMA_ID , b.CATEGORY_ID , 0 , null from goods_param a inner join goods b on a.GOODS_ID = b.ID and a.PRAMA_ID is not null AND a.VAL is not null and a.ISDELETED = 0 and a.`STATUS` = 0 and b.`STATUS` = 0 and b.ISDELETED = 0 AND b.company_id = #{companyId} </insert> </mapper>