张天森
2022-11-18 2530cdb3597762202acf524206a00b2ab5f88126
Merge branch 'huacheng_test' into haucheng_panzhihua
14个文件已修改
136 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopFlowerGoodsVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ShopFlowerApi.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopFlowerApi.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMediateTypeDao.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopFlowerGoodsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/CommediateTypeService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerGoodsServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/CommediateTypeServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMediaTypeMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerGoodsMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ShopFlowerApi.java
@@ -11,6 +11,7 @@
import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO;
import com.panzhihua.common.model.vos.shop.*;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.validated.AddGroup;
import com.panzhihua.common.validated.PutGroup;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -60,11 +61,34 @@
    }
    @ApiOperation(value = "查询商品详情", response = ComShopFlowerGoodsVO.class)
    @PostMapping("shopGoodsDetail")
    @GetMapping("shopGoodsDetail")
    @ApiImplicitParam(name = "goodsId", value = "商品id", required = true)
    public R shopGoodsDetail(@RequestParam("goodsId") Long goodsId) {
        return communityService.shopFlowerGoodsDetail(goodsId);
    }
    @ApiOperation(value = "删除商品")
    @DeleteMapping("/goods/delete")
    public R deleteShopGoods(@RequestParam("goodsId") Long goodsId) {
        return communityService.deleteFlowerShopGoods(goodsId);
    }
    @ApiOperation(value = "商品上下架")
    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "商品Id"),
            @ApiImplicitParam(name = "status", value = "1.上架  2.下架 ")})
    @GetMapping("/goods/changeStatus")
    public R changeStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status) {
        return communityService.changeFlowerStatus(id, status);
    }
    @ApiOperation(value = "编辑商品")
    @PostMapping("/goods/edit/{id}")
    public R editShopGoods(@PathVariable("id") Long id,
                           @RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) {
        return communityService.editFlowerShopGoods(id, addShopGoodsVO);
    }
    @ApiOperation(value = "新增商品")
    @PostMapping("/goods/save")
    public R saveShopGoods(@RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) {
        return communityService.saveFlowerShopGoods(addShopGoodsVO);
    }
    @ApiOperation(value = "查询用户收货地址列表", response = ComShopUserAddressVO.class)
    @PostMapping("shopUserAddressList")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopFlowerGoodsVO.java
@@ -49,7 +49,7 @@
    /**
     * 配送方式(1.商家配送 2.快递物流)
     */
    @ApiModelProperty(value = "配送方式(1.商家配送  2.快递物流)", hidden = true)
    @ApiModelProperty(value = "配送方式(1.自提  2.快递)")
    private Integer deliveryType;
    @ApiModelProperty("商品规格")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -2974,11 +2974,11 @@
    /**
     * 删除商品
     *
     * @param id
     * @param goodsId
     * @return
     */
    @PostMapping("/shopFlower/deleteShopGoods")
    R deleteFlowerShopGoods(@RequestBody Long[] id);
    @DeleteMapping("/shopFlower/deleteShopGoods")
    R deleteFlowerShopGoods(@RequestParam("goodsId") Long goodsId);
    /**
     * 修改商品状态
@@ -2990,12 +2990,12 @@
    R changeFlowerStatus(@RequestParam("id") Long id, @RequestParam("status") Integer status);
    /**
     * 修改商品状态
     * 商品详情
     *
     * @param goodsId
     * @return
     */
    @PostMapping("/shopFlower/shopGoodsDetail")
    @GetMapping("/shopFlower/shopGoodsDetail")
    R shopFlowerGoodsDetail(@RequestParam("goodsId") Long goodsId);
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ShopFlowerApi.java
@@ -28,22 +28,10 @@
 */
@Slf4j
@Api(tags = {"花城商城管理模块"})
@RestController("/shopFlower")
@RestController
@RequestMapping("shopFlower")
public class ShopFlowerApi extends BaseController {
    @Value("${excel.userurl}")
    private String excelUrl;
    // FTP 登录用户名
    @Value("${ftp.username}")
    private String userName;
    // FTP 登录密码
    @Value("${ftp.password}")
    private String password;
    // FTP 服务器地址IP地址
    @Value("${ftp.host}")
    private String host;
    // FTP 端口
    @Value("${ftp.port}")
    private int port;
    @Resource
    private CommunityService communityService;
    @Resource
@@ -83,11 +71,18 @@
                           @RequestBody @Validated(AddGroup.class) AddShopFlowerGoodsVO addShopGoodsVO) {
        return communityService.editFlowerShopGoods(id, addShopGoodsVO);
    }
    @ApiOperation(value = "查询商品详情", response = ComShopFlowerGoodsVO.class)
    @GetMapping("shopGoodsDetail")
    @ApiImplicitParam(name = "goodsId", value = "商品id", required = true)
    public R shopGoodsDetail(@RequestParam("goodsId") Long goodsId) {
        return communityService.shopFlowerGoodsDetail(goodsId);
    }
    @ApiOperation(value = "删除商品")
    @PostMapping("/goods/delete")
    public R deleteShopGoods(@RequestBody Long[] id) {
        return communityService.deleteFlowerShopGoods(id);
    @DeleteMapping("/goods/delete")
    public R deleteShopGoods(@RequestParam("goodsId") Long goodsId) {
        return communityService.deleteFlowerShopGoods(goodsId);
    }
    @ApiOperation(value = "商品上下架")
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventApi.java
@@ -8,6 +8,7 @@
import com.panzhihua.common.model.dtos.community.sanshuo.ComSanshuoEventDTO;
import com.panzhihua.common.model.dtos.community.sanshuo.IndexDateDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.entity.ComEvent;
import com.panzhihua.service_community.entity.ComMediateType;
import com.panzhihua.service_community.entity.ComSanshuoEvent;
@@ -38,11 +39,15 @@
    @Resource
    private IComEventService comEventService;
    @Resource
    private UserService userService;
    @GetMapping ("/list")
    public R list(@RequestParam(value = "keyWord",required = false)String keyWord,
                  @RequestParam(value = "page",required = false)Integer page,
                  @RequestParam(value = "size",required = false)Integer size){
        return commediateTypeService.listEvent(keyWord,page,size);
        String appId=userService.detailUser(this.getUserId()).getData().getAppId();
        return commediateTypeService.listEvent(keyWord,page,size,appId);
    }
    @GetMapping("/detail")
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ShopFlowerApi.java
@@ -85,12 +85,12 @@
    /**
     * 删除商品
     *
     * @param id
     * @param goodsId
     * @return
     */
    @PostMapping("deleteShopGoods")
    public R deleteFlowerShopGoods(@RequestBody Long[] id) {
        return comShopFlowerGoodsService.deleteShopFlowerGoods(id);
    @DeleteMapping("deleteShopGoods")
    public R deleteFlowerShopGoods(@RequestParam("goodsId") Long goodsId) {
        return comShopFlowerGoodsService.deleteShopFlowerGoods(goodsId);
    }
    /**
@@ -99,7 +99,7 @@
     * @param goodsId 商品id
     * @return 商品信息
     */
    @PostMapping("shopGoodsDetail")
    @GetMapping("shopGoodsDetail")
    public R shopFlowerGoodsDetail(@RequestParam("goodsId") Long goodsId) {
        return comShopFlowerGoodsService.shopFlowerGoodsDetail(goodsId);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMediateTypeDao.java
@@ -28,7 +28,7 @@
    /**
     * 查询该事件类型的事件数量
     * */
    Integer selectEventCount(Long id);
    Integer selectEventCount(@Param("id") Long id,@Param("appId")String appId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComShopFlowerGoodsService.java
@@ -70,7 +70,7 @@
     * @param id
     * @return
     */
    R deleteShopFlowerGoods(Long[] id);
    R deleteShopFlowerGoods(Long id);
    /**
     * 修改商品状态
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/CommediateTypeService.java
@@ -14,7 +14,7 @@
     * @param size
     * @return 处理结果
     * */
    R listEvent(String keyWord, Integer page, Integer size);
    R listEvent(String keyWord, Integer page, Integer size,String appId);
    /**
     * 新增或修改事件类型
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerGoodsServiceImpl.java
@@ -59,16 +59,11 @@
        if (addShopFlowerGoodsVO == null) {
            return R.ok("500", "数据为空!");
        }
        String[] images = addShopFlowerGoodsVO.getGoodsPic().split(",");
        ComShopFlowerGoodsDO shopGoodsDO = new ComShopFlowerGoodsDO();
        BeanUtils.copyProperties(addShopFlowerGoodsVO, shopGoodsDO);
        shopGoodsDO.setOriginalPrice(addShopFlowerGoodsVO.getPrice());
        if (images.length > 1) {
            shopGoodsDO.setGoodsPic(images[0]);
        }
        shopGoodsDO.setImages(addShopFlowerGoodsVO.getGoodsPic());
        shopGoodsDO.setSale(0);
        shopGoodsDO.setDetails(addShopFlowerGoodsVO.getDetails());
        int goodsId = this.baseMapper.insert(shopGoodsDO);
        if (goodsId > 0) {
@@ -136,6 +131,7 @@
                for (ComShopFlowerGoodsAttrDO oneGoodsAttrDO : goodsAttrDOs) {
                    AddShopFlowerGoodsAttrVO goodsAttrVO = new AddShopFlowerGoodsAttrVO();
                    BeanUtils.copyProperties(oneGoodsAttrDO, goodsAttrVO);
                    goodsAttrVO.setGoodsAttrId(oneGoodsAttrDO.getId());
                    goodsAttrVOList.add(goodsAttrVO);
                }
                shopGoods.setGoodsAttrs(goodsAttrVOList);
@@ -269,7 +265,7 @@
                    shopFlowerGoodsAttrDAO.updateById(comShopGoodsAttrDO);
                } else {
                    comShopGoodsAttrDO = new ComShopFlowerGoodsAttrDO();
                    comShopGoodsAttrDO.setGoodsId(shopGoodsDO.getId());
                    comShopGoodsAttrDO.setGoodsId(id);
                    comShopGoodsAttrDO.setStoreId(shopGoodsDO.getStoreId());
                    comShopGoodsAttrDO.setGoodsName(shopGoodsDO.getName());
                    comShopGoodsAttrDO.setGoodsAttrName(goodsAttr.getGoodsAttrName());
@@ -288,13 +284,10 @@
    }
    @Override
    public R deleteShopFlowerGoods(Long[] id) {
        LambdaQueryWrapper<ComShopFlowerGoodsDO> query = new LambdaQueryWrapper<ComShopFlowerGoodsDO>().in(ComShopFlowerGoodsDO::getId, id);
        List<ComShopFlowerGoodsDO> comShopGoodsDOS = this.baseMapper.selectList(query);
        for (ComShopFlowerGoodsDO one : comShopGoodsDOS) {
            one.setDeleteStatus(ComShopFlowerGoodsDO.deleteStatus.yes);
            this.baseMapper.updateById(one);
        }
    public R deleteShopFlowerGoods(Long id) {
        ComShopFlowerGoodsDO comShopFlowerGoodsDO = this.baseMapper.selectById(id);
        comShopFlowerGoodsDO.setDeleteStatus(ComShopFlowerGoodsDO.deleteStatus.yes);
        this.baseMapper.updateById(comShopFlowerGoodsDO);
        return R.ok();
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/CommediateTypeServiceImpl.java
@@ -40,13 +40,13 @@
     * @return 处理结果
     * */
    @Override
    public R listEvent(String keyWord, Integer page, Integer size) {
    public R listEvent(String keyWord, Integer page, Integer size,String appId) {
        IPage<ComMediateType> comMediateTypeIPage = comMediateTypeDao.eventList(new Page(page, size), keyWord);
        List<ComMediateType> records = comMediateTypeIPage.getRecords();
        for (ComMediateType record : records) {
            //查询事件数量
            if (nonNull(record) && nonNull(record.getId())){
                record.setEventCount(comMediateTypeDao.selectEventCount(record.getId()));
                record.setEventCount(comMediateTypeDao.selectEventCount(record.getId(),appId));
            }
        }
        comMediateTypeIPage.setRecords(records);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -274,6 +274,8 @@
        (SELECT count(id) FROM com_sanshuo_event_info
        where is_end &lt;> 1
        AND user_event_status not in(3,4)
        AND event_process_status > 1
        AND event_process_status not in (9)
        AND app_id='wx0cef797390444b75'
        <if test="dto.type == 2">
            AND current_process_type in (1,5)
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMediaTypeMapper.xml
@@ -11,5 +11,6 @@
    <select id="selectEventCount" resultType="java.lang.Integer">
        select count(id) from com_sanshuo_event_info
        where event_category = #{id}
        AND app_id=#{appId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerGoodsMapper.xml
@@ -36,20 +36,20 @@
        storeName,c.name,c.store_id,c.goods_pic,c.images,c.status,c.sale,c.original_price,c.price,c.unit,c.order,c.stock,c.details,c.remark,c.goods_describe,c.delivery_type,c.delete_status,c.create_at,c.update_at
        from com_shop_flower_goods c
        left join com_convenient_merchants ccm on c.store_id=ccm.id
        <where>and
        where  c.delete_status = 1 and ccm.is_del = 0
            <if test='pageComShopFlowerGoodsDTO.storeName != null and pageComShopFlowerGoodsDTO.storeName.trim() != &quot;&quot;'>
                c.delete_status = 1 and ccm.id_del = 0
                and ccm.name like concat('%',#{pageComShopFlowerGoodsDTO.storeName},'%')
            </if>
            <if test='pageComShopFlowerGoodsDTO.name != null and pageComShopFlowerGoodsDTO.name.trim() != &quot;&quot;'>and c.name
                like concat('%',#{pageComShopFlowerGoodsDTO.name},'%')
            <if test='pageComShopFlowerGoodsDTO.name != null and pageComShopFlowerGoodsDTO.name.trim() != &quot;&quot;'>
                and c.name like concat('%',#{pageComShopFlowerGoodsDTO.name},'%')
            </if>
            <if test='pageComShopFlowerGoodsDTO.storeId != null'>and ccm.id=#{pageComShopFlowerGoodsDTO.storeId}
            <if test='pageComShopFlowerGoodsDTO.storeId != null'>
                and ccm.id=#{pageComShopFlowerGoodsDTO.storeId}
            </if>
            <if test='pageComShopFlowerGoodsDTO.status != null'>and c.status like
                concat('%',#{pageComShopFlowerGoodsDTO.status},'%')
            <if test='pageComShopFlowerGoodsDTO.status != null'>
                and c.status like concat('%',#{pageComShopFlowerGoodsDTO.status},'%')
            </if>
        </where>
        order by c.create_at desc
    </select>
    <select id="pageShopGoodsByStoreId" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerGoodsVO">