diff --git a/eladmin-system/pom.xml b/eladmin-system/pom.xml index e6cb4ab1..cdd5e3dd 100644 --- a/eladmin-system/pom.xml +++ b/eladmin-system/pom.xml @@ -99,7 +99,20 @@ 3.3.2 - + + + dev + + dev + + + + pro + + pro + + + diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/productInfo/product/domain/TbProductVo.java b/eladmin-system/src/main/java/me/zhengjie/modules/productInfo/product/domain/TbProductVo.java index 42389a79..1c36cea6 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/productInfo/product/domain/TbProductVo.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/productInfo/product/domain/TbProductVo.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray; import lombok.Data; import me.zhengjie.modules.productInfo.productSku.domain.TbProductSku; +import javax.validation.constraints.NotNull; import java.math.BigDecimal; import java.util.HashMap; import java.util.List; @@ -43,7 +44,7 @@ public class TbProductVo { private String coverImg; - + @NotNull(message ="缺少商品类信息") private Integer categoryId; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/productInfo/product/service/impl/TbProductServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/productInfo/product/service/impl/TbProductServiceImpl.java index 11581f87..bbf022f7 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/productInfo/product/service/impl/TbProductServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/productInfo/product/service/impl/TbProductServiceImpl.java @@ -284,6 +284,7 @@ public class TbProductServiceImpl implements TbProductService { product.setIsFreeFreight(1); product.setStatus(1); product.setUpdatedAt(Instant.now().toEpochMilli()); + product.setCategoryId(resources.getCategoryId().toString()); if (!resources.getGroupSnap().isEmpty()){ ListUtil.JSONArrayChangeString(resources.getGroupSnap()); diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopArea/service/dto/TbShopAreaQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopArea/service/dto/TbShopAreaQueryCriteria.java index 10acbaa2..5ffcaf39 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopArea/service/dto/TbShopAreaQueryCriteria.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopArea/service/dto/TbShopAreaQueryCriteria.java @@ -26,4 +26,6 @@ import me.zhengjie.annotation.Query; **/ @Data public class TbShopAreaQueryCriteria{ + @Query + private String shopId; } \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/rest/TbMerchantThirdApplyController.java b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/rest/TbMerchantThirdApplyController.java index 457daab5..50bec276 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/rest/TbMerchantThirdApplyController.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/rest/TbMerchantThirdApplyController.java @@ -55,7 +55,7 @@ public class TbMerchantThirdApplyController { @GetMapping @Log("查询/shop/thirdApply") @ApiOperation("查询/shop/thirdApply") - @PreAuthorize("@el.check('tbMerchantThirdApply:list')") + public ResponseEntity queryTbMerchantThirdApply(TbMerchantThirdApplyQueryCriteria criteria, Pageable pageable){ return new ResponseEntity<>(tbMerchantThirdApplyService.queryAll(criteria,pageable),HttpStatus.OK); } diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/service/dto/TbMerchantThirdApplyDto.java b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/service/dto/TbMerchantThirdApplyDto.java index 2d24d8b4..8f5fe5fc 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/service/dto/TbMerchantThirdApplyDto.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/service/dto/TbMerchantThirdApplyDto.java @@ -30,7 +30,7 @@ public class TbMerchantThirdApplyDto implements Serializable { /** 自增id */ private Integer id; - private String type; + private String type =""; /** 商户应用 */ private String appId=""; diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/service/impl/TbMerchantThirdApplyServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/service/impl/TbMerchantThirdApplyServiceImpl.java index 5c10a087..37d9d5d3 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/service/impl/TbMerchantThirdApplyServiceImpl.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/shopThirdApply/service/impl/TbMerchantThirdApplyServiceImpl.java @@ -30,6 +30,8 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import me.zhengjie.utils.PageUtil; import me.zhengjie.utils.QueryHelp; + +import java.time.Instant; import java.util.List; import java.util.Map; import java.io.IOException; @@ -90,12 +92,9 @@ public class TbMerchantThirdApplyServiceImpl implements TbMerchantThirdApplyServ public void update(TbMerchantThirdApply resources) { TbMerchantThirdApply tbMerchantThirdApply = tbMerchantThirdApplyRepository.findById(resources.getId()).orElseGet(TbMerchantThirdApply::new); ValidationUtil.isNull( tbMerchantThirdApply.getId(),"TbMerchantThirdApply","id",resources.getId()); -// tbMerchantThirdApply1 = tbMerchantThirdApplyRepository.findByAppId(resources.getAppId()); -// if(tbMerchantThirdApply1 != null && !tbMerchantThirdApply1.getId().equals(tbMerchantThirdApply.getId())){ -// throw new EntityExistException(TbMerchantThirdApply.class,"app_id",resources.getAppId()); -// } + tbMerchantThirdApply.setUpdatedAt(Instant.now().toEpochMilli()); tbMerchantThirdApply.copy(resources); - tbMerchantThirdApplyRepository.save(tbMerchantThirdApply); + tbMerchantThirdApplyRepository.saveAndFlush(tbMerchantThirdApply); } @Override diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/table/rest/TbShopTableController.java b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/table/rest/TbShopTableController.java index 4d23bc57..b866c9b4 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/table/rest/TbShopTableController.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/shopInfo/table/rest/TbShopTableController.java @@ -61,7 +61,6 @@ public class TbShopTableController { @PostMapping @Log("新增/shop/table") @ApiOperation("新增/shop/table") - @PreAuthorize("@el.check('tbShopTable:add')") public ResponseEntity createTbShopTable(@Validated @RequestBody TbShopTable resources){ return new ResponseEntity<>(tbShopTableService.create(resources),HttpStatus.CREATED); } @@ -75,7 +74,6 @@ public class TbShopTableController { @PutMapping @Log("修改/shop/table") @ApiOperation("修改/shop/table") - @PreAuthorize("@el.check('tbShopTable:edit')") public ResponseEntity updateTbShopTable(@Validated @RequestBody TbShopTable resources){ tbShopTableService.update(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); @@ -84,7 +82,6 @@ public class TbShopTableController { @DeleteMapping @Log("删除/shop/table") @ApiOperation("删除/shop/table") - @PreAuthorize("@el.check('tbShopTable:del')") public ResponseEntity deleteTbShopTable(@RequestBody Integer[] ids) { tbShopTableService.deleteAll(ids); return new ResponseEntity<>(HttpStatus.OK); diff --git a/eladmin-system/src/main/resources/config/application.yml b/eladmin-system/src/main/resources/config/application.yml index 3fd8cb65..c6252559 100644 --- a/eladmin-system/src/main/resources/config/application.yml +++ b/eladmin-system/src/main/resources/config/application.yml @@ -5,7 +5,8 @@ spring: freemarker: check-template-location: false profiles: - active: dev + active: @env@ + jackson: time-zone: GMT+8 default-property-inclusion: always