CeDo
2021-04-17 53730f292f424132acc1fb4c1c04ed028e34f43a
Merge remote-tracking branch 'origin/master'
3个文件已修改
36 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/ShopApi.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/PageComShopStoreDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopStoreDAO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/ShopApi.java
@@ -38,13 +38,13 @@
    @Resource
    private UserService userService;
    @ApiOperation(value = "分页查询商铺", response = ComShopStoreVO.class)
    @ApiOperation(value = "分页查询商家", response = ComShopStoreVO.class)
    @PostMapping("/page")
    public R pageVolunteer(@RequestBody PageComShopStoreDTO pageComShopStoreDTO) {
        return communityService.pageStoreList(pageComShopStoreDTO);
    }
    @ApiOperation(value = "保存商铺")
    @ApiOperation(value = "保存商家")
    @PostMapping("/save")
    public R saveStore(@Valid @RequestBody ShopStoreVO storeVO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
@@ -75,9 +75,9 @@
        return R.ok();
    }
    @ApiOperation(value = "编辑店铺、启用、禁用")
    @ApiOperation(value = "编辑商家、启用、禁用")
    @PostMapping("/edit/{id}")
    @ApiImplicitParam(name = "id", value = "商铺id")
    @ApiImplicitParam(name = "id", value = "商家id")
    public R editStore(@Valid @RequestBody ShopStoreVO storeVO, @PathVariable("id") Long id) {
        R<LoginUserInfoVO> sysUserVO = userService.getUserInfoByUserId(storeVO.getSysUserId() + "");
        if (sysUserVO.getData() == null) {
@@ -102,7 +102,7 @@
        return R.fail();
    }
    @ApiOperation(value = "删除商铺")
    @ApiOperation(value = "删除商家")
    @PostMapping("/delete")
    public R delete(@RequestBody Long[] ids) {
        return communityService.deleteStore(ids);
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/shop/PageComShopStoreDTO.java
@@ -15,9 +15,9 @@
    @ApiModelProperty(value = "商家姓名")
    private String contacts;
    @ApiModelProperty(value = "商家账号")
    private String name;
    @ApiModelProperty(value = "店铺名称")
    private String account;
    @ApiModelProperty(value = "店铺名称")
    private String name;
    @ApiModelProperty(value = "配送方式(1.商家配送  2.快递物流)")
    private Integer deliveryType;
    @ApiModelProperty(value = "店铺状态(1.启用  2.禁用)")
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComShopStoreDAO.java
@@ -18,7 +18,27 @@
@Mapper
public interface ComShopStoreDAO extends BaseMapper<ComShopStoreDO> {
    @Select("select id,`name`,classify_id,logo,phone,delivery_type,remark,`status`,sale,sale_volume,store_detail from com_shop_store")
    @Select("<script>" +
            "select id,`name`,classify_id,logo,phone,delivery_type,remark,`status`,sale,sale_volume,store_detail from com_shop_store c" +
            " <where>" +
            "<if test='pageComShopStoreDTO.contacts != null and pageComShopStoreDTO.contacts.trim() != &quot;&quot;'>" +
            "and c.contacts like concat('%',#{pageComShopStoreDTO.contacts},'%') \n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.account != null and pageComShopStoreDTO.account.trim() != &quot;&quot;'>" +
            "and c.account = #{pageComShopStoreDTO.account} \n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.name != null and pageComShopStoreDTO.name.trim() != &quot;&quot;'>" +
            "and c.`name` like concat('%',#{pageComShopStoreDTO.name},'%') \n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.deliveryType != null'>" +
            "and c.delivery_type =#{pageComShopStoreDTO.deliveryType}\n" +
            " </if> " +
            "<if test='pageComShopStoreDTO.status != null'>" +
            "and c.status =#{pageComShopStoreDTO.status} \n" +
            " </if> " +
            " </where>" +
            " order by c.create_at desc"+
            "</script>")
    IPage<ComShopStoreVO> pageShopStore(Page page, @Param("pageComShopStoreDTO") PageComShopStoreDTO pageComShopStoreDTO);
}