lidongdong
2023-08-30 a1ba84efcddcef8f19de26b5f34f9fa2df2c0582
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/VolunteerIntegralMerchantApi.java
@@ -15,6 +15,10 @@
import javax.annotation.Resource;
/**
 * 商品内容逻辑
 */
@Slf4j
@RestController
@RequestMapping("/VolunteerIntegralMerchant")
@@ -43,10 +47,12 @@
    public R VolunteerIntegralMerchantQueryList(@RequestParam("pageNum") int pageNum,
                                                @RequestParam("pageSize")  int pageSize,
                                                @RequestParam(value = "name", required = false) String name,
                                                @RequestParam(value = "state", required = false) String state)
                                                @RequestParam(value = "state", required = false) String state,
                                                @RequestParam(value = "goodType", required = false) String goodType,
                                                @RequestParam(value = "merchantId", required = false) String merchantId)
    {
        Page page=new Page<VolunteerIntegralMerchant>(pageNum,pageSize);
        return R.ok(merchantService.queryList(page,name,state));
        return R.ok(merchantService.queryList(page,name,state,goodType,merchantId));
    }
    /**
@@ -81,6 +87,11 @@
        if(StringUtils.isEmpty(vimVO.getCommodityValue()))
        {
            return R.fail("商品价值不能为空");
        }
        if(StringUtils.isEmpty(vimVO.getGoodNum()))
        {
            return R.fail("商品数量不能为空");
        }
        int num= merchantService.insertVolunteer(vimVO);
@@ -195,7 +206,7 @@
     * @param
     * @return
     */
    @GetMapping("order/getList")
    @GetMapping("/order/getList")
    public R getList(@RequestParam("pageNum") int pageNum,
                     @RequestParam("pageSize")  int pageSize,
                     @RequestParam(value = "goodsId", required = false) String goodsId,
@@ -204,10 +215,11 @@
                     @RequestParam(value = "condition", required = false) String condition,
                     @RequestParam(value = "userName", required = false) String userName,
                     @RequestParam(value = "communityId", required = false) String communityId,
                     @RequestParam(value = "userId", required = false) String userId)
                     @RequestParam(value = "userId", required = false) String userId,
                     @RequestParam(value = "orderType", required = false) String orderType)
    {
        return vceService.getList(pageNum,pageSize,goodsId,orderNumber,goodsName,
                condition,userName,communityId,userId);
                condition,userName,communityId,userId,orderType);
    }
    /**
@@ -215,7 +227,7 @@
     * @param id
     * @return
     */
    @GetMapping("order/getData")
    @GetMapping("/order/getData")
    public R getData(@RequestParam("id") String id)
    {
        if(StringUtils.isEmpty(id))
@@ -240,11 +252,28 @@
        }
        item.setUserId(userInfoVO.getUserId()+"");
        item.setNeedScore(userInfoVO.getLoveIntegral());
        return vceService.insertData(item);
    }
    /**
     * 新增用户购买商家商品记录
     * @param
     * @return
     */
    @PostMapping("/order/insertMerchantData")
    public R insertMerchantData(@RequestBody VolunteerCreditsExchangeVO item)
    {
        LoginUserInfoVO userInfoVO= getLoginUserInfo();
        if(StringUtils.isEmpty(item.getCommunityId()))
        {
            item.setCommunityId(userInfoVO.getCommunityId()+"");
        }
        item.setUserId(userInfoVO.getUserId()+"");
        return vceService.insertMerchantData(item);
    }
    /**
     * 更新
     * @param item
     * @return