| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerCreditsExchangeVO; |
| | | import com.panzhihua.common.model.vos.community.VolunteerIntegralMerchantVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.entity.VolunteerIntegralMerchant; |
| | | import com.panzhihua.service_community.service.VolunteerCreditsExchangeService; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | /** |
| | | * 商品内容逻辑 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/VolunteerIntegralMerchant") |
| | |
| | | { |
| | | @Resource |
| | | private VolunteerIntegralMerchantService merchantService; |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | /** |
| | | * 获取单个详情 |
| | |
| | | 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)); |
| | | } |
| | | |
| | | /** |
| | |
| | | if(StringUtils.isEmpty(vimVO.getCommodityValue())) |
| | | { |
| | | return R.fail("商品价值不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(vimVO.getGoodNum())) |
| | | { |
| | | return R.fail("商品数量不能为空"); |
| | | } |
| | | |
| | | int num= merchantService.insertVolunteer(vimVO); |
| | |
| | | item.setCommunityId(userInfoVO.getCommunityId()+""); |
| | | } |
| | | |
| | | R<LoginUserInfoVO> loginUserInfoVOR=userService.getUserInfoByUserId(userInfoVO.getUserId()+""); |
| | | |
| | | item.setUserId(userInfoVO.getUserId()+""); |
| | | item.setNeedScore(loginUserInfoVOR.getData().getLoveIntegral()); |
| | | return vceService.insertData(item); |
| | | } |
| | | |