| | |
| | | import com.panzhihua.common.model.vos.community.ComActMicroWishVO; |
| | | import com.panzhihua.common.model.vos.community.building.IntegratingTaskVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightShoppingOrderVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightShoppingVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiShoppingOrderVO; |
| | | import com.panzhihua.common.model.vos.user.SysTemplateConfigVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserNoticeVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | |
| | | } |
| | | |
| | | |
| | | /******************************************************************************************************************* |
| | | * |
| | | * 商品订单 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单列表", response = NewFightShoppingOrderVO.class) |
| | | @GetMapping("/orderGetList") |
| | | public R orderGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "goodsId", required = false)String goodsId, |
| | | @RequestParam(value = "orderNumber", required = false)String orderNumber, |
| | | @RequestParam(value = "goodName", required = false)String goodName, |
| | | @RequestParam(value = "name", required = false)String name, |
| | | @RequestParam(value = "cancelType", required = false)String cancelType) |
| | | { |
| | | return newStriveForFeign.orderGetList(pageNum,pageSize,userId,goodsId,orderNumber, |
| | | goodName,name,cancelType,getCommunityId()+""); |
| | | } |
| | | |
| | | /** |
| | | * 分页详情 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单详情", response = NewFightShoppingOrderVO.class) |
| | | @GetMapping("/orderGetDetails") |
| | | public R orderGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.orderGetDetails(id,getCommunityId()+""); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单添加") |
| | | @PostMapping("/orderAddData") |
| | | public R orderAddData(@RequestBody NewFightShoppingOrderVO item) |
| | | { |
| | | item.setCommunityId(getCommunityId()+""); |
| | | item.setUserId(getUserId()+""); |
| | | return newStriveForFeign.orderAddData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单编辑", response = NewFightShoppingOrderVO.class) |
| | | @PostMapping("/NewFightOrder/orderEditData") |
| | | public R orderEditData(@RequestBody NewFightShoppingOrderVO item) |
| | | { |
| | | return newStriveForFeign.orderEditData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单取消") |
| | | @GetMapping("/orderCancelOrder") |
| | | public R orderCancelOrder(@RequestParam("orderId") String orderId) |
| | | { |
| | | return newStriveForFeign.orderCancelOrder(orderId,getCommunityId()+""); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单删除") |
| | | @DeleteMapping("/orderExpurgateData") |
| | | public R orderExpurgateData(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.orderExpurgateData(id,getCommunityId()+""); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "订单核销") |
| | | @GetMapping("/orderCheck") |
| | | public R orderEditData(@RequestParam("id") String id) |
| | | { |
| | | |
| | | if(org.apache.commons.lang3.StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("订单id不能为空"); |
| | | } |
| | | |
| | | NewFightShoppingOrderVO vo=new NewFightShoppingOrderVO(); |
| | | vo.setId(id); |
| | | vo.setCancelType("1"); |
| | | vo.setCancelTime(new Date()); |
| | | return newStriveForFeign.orderEditData(vo); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.partybuilding.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.building.IntegratingTaskVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightConfigVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightShoppingVO; |
| | | import com.panzhihua.common.model.vos.community.building.*; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @PostMapping("/IntegratingTask/upIntegral") |
| | | public R upIntegral(@RequestBody NewFightIntegral item); |
| | | |
| | | /******************************************************************************************************************* |
| | | |
| | | * |
| | | * 商品订单 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/NewFightOrder/orderGetList") |
| | | public R orderGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "goodsId", required = false)String goodsId, |
| | | @RequestParam(value = "orderNumber", required = false)String orderNumber, |
| | | @RequestParam(value = "goodName", required = false)String goodName, |
| | | @RequestParam(value = "name", required = false)String name, |
| | | @RequestParam(value = "cancelType", required = false)String cancelType, |
| | | @RequestParam(value = "communityId", required = false)String communityId); |
| | | |
| | | /** |
| | | * 分页详情 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/NewFightOrder/orderGetDetails") |
| | | public R orderGetDetails(@RequestParam("id") String id, |
| | | @RequestParam(value = "communityId") String communityId); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/NewFightOrder/orderAddData") |
| | | public R orderAddData(@RequestBody NewFightShoppingOrderVO item); |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/NewFightOrder/orderEditData") |
| | | public R orderEditData(@RequestBody NewFightShoppingOrderVO item); |
| | | |
| | | |
| | | /** |
| | | * 取消 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/NewFightOrder/orderCancelOrder") |
| | | public R orderCancelOrder(@RequestParam("orderId") String orderId, |
| | | @RequestParam(value = "communityId") String communityId); |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/NewFightOrder/orderExpurgateData") |
| | | public R orderExpurgateData(@RequestParam("id") String id, |
| | | @RequestParam(value = "communityId") String communityId); |
| | | |
| | | |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightConfigVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightShoppingOrderVO; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightShoppingVO; |
| | | import com.panzhihua.common.service.partybuilding.NewStriveForFeign; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | |
| | | |
| | | |
| | | /******************************************************************************************************************* |
| | | * |
| | | * 商品订单 |
| | | * |
| | | ****************************************************************************************************************/ |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单列表", response = NewFightShoppingOrderVO.class) |
| | | @GetMapping("/orderGetList") |
| | | public R orderGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "goodsId", required = false)String goodsId, |
| | | @RequestParam(value = "orderNumber", required = false)String orderNumber, |
| | | @RequestParam(value = "goodName", required = false)String goodName, |
| | | @RequestParam(value = "name", required = false)String name, |
| | | @RequestParam(value = "cancelType", required = false)String cancelType) |
| | | { |
| | | return newStriveForFeign.orderGetList(pageNum,pageSize,userId,goodsId,orderNumber, |
| | | goodName,name,cancelType,getCommunityId()+""); |
| | | } |
| | | |
| | | /** |
| | | * 分页详情 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单详情", response = NewFightShoppingOrderVO.class) |
| | | @GetMapping("/orderGetDetails") |
| | | public R orderGetDetails(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.orderGetDetails(id,getCommunityId()+""); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单添加") |
| | | @PostMapping("/orderAddData") |
| | | public R orderAddData(@RequestBody NewFightShoppingOrderVO item) |
| | | { |
| | | item.setCommunityId(getCommunityId()+""); |
| | | item.setUserId(getUserId()+""); |
| | | return newStriveForFeign.orderAddData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单编辑", response = NewFightShoppingOrderVO.class) |
| | | @PostMapping("/NewFightOrder/orderEditData") |
| | | public R orderEditData(@RequestBody NewFightShoppingOrderVO item) |
| | | { |
| | | return newStriveForFeign.orderEditData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单取消") |
| | | @GetMapping("/orderCancelOrder") |
| | | public R orderCancelOrder(@RequestParam("orderId") String orderId) |
| | | { |
| | | return newStriveForFeign.orderCancelOrder(orderId,getCommunityId()+""); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "订单删除") |
| | | @DeleteMapping("/orderExpurgateData") |
| | | public R orderExpurgateData(@RequestParam("id") String id) |
| | | { |
| | | return newStriveForFeign.orderExpurgateData(id,getCommunityId()+""); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "订单核销") |
| | | @GetMapping("/orderCheck") |
| | | public R orderEditData(@RequestParam("id") String id) |
| | | { |
| | | |
| | | if(org.apache.commons.lang3.StringUtils.isEmpty(id)) |
| | | { |
| | | return R.fail("订单id不能为空"); |
| | | } |
| | | |
| | | NewFightShoppingOrderVO vo=new NewFightShoppingOrderVO(); |
| | | vo.setId(id); |
| | | vo.setCancelType("1"); |
| | | vo.setCancelTime(new Date()); |
| | | return newStriveForFeign.orderEditData(vo); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_dangjian.api; |
| | | |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.building.NewFightShoppingOrderVO; |
| | | import com.panzhihua.service_dangjian.service.NewFightShoppingOrderService; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | @Slf4j |
| | | @Api(tags = {"社区动态/随手拍/微心愿/社区活动"}) |
| | | @RestController |
| | | @RequestMapping("/NewFightOrder") |
| | | public class NewFightShoppingOrderApi |
| | | { |
| | | |
| | | @Resource |
| | | private NewFightShoppingOrderService orderService; |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/orderGetList") |
| | | public R orderGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "userId", required = false)String userId, |
| | | @RequestParam(value = "goodsId", required = false)String goodsId, |
| | | @RequestParam(value = "orderNumber", required = false)String orderNumber, |
| | | @RequestParam(value = "goodName", required = false)String goodName, |
| | | @RequestParam(value = "name", required = false)String name, |
| | | @RequestParam(value = "cancelType", required = false)String cancelType, |
| | | @RequestParam(value = "communityId", required = false)String communityId) |
| | | { |
| | | return orderService.getList(pageNum,pageSize,userId,goodsId,orderNumber, |
| | | goodName,name,cancelType,communityId); |
| | | } |
| | | |
| | | /** |
| | | * 分页详情 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/orderGetDetails") |
| | | public R orderGetDetails(@RequestParam("id") String id, |
| | | @RequestParam(value = "communityId") String communityId) |
| | | { |
| | | return R.ok(orderService.getDetails(id,communityId)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/orderAddData") |
| | | public R orderAddData(@RequestBody NewFightShoppingOrderVO item) |
| | | { |
| | | return orderService.addData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @PostMapping("/orderEditData") |
| | | public R orderEditData(@RequestBody NewFightShoppingOrderVO item) |
| | | { |
| | | return orderService.editData(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping("/orderCancelOrder") |
| | | public R orderCancelOrder(@RequestParam("orderId") String orderId, |
| | | @RequestParam(value = "communityId") String communityId) |
| | | { |
| | | return orderService.cancelOrder(orderId,communityId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/orderExpurgateData") |
| | | public R orderExpurgateData(@RequestParam("id") String id, |
| | | @RequestParam(value = "communityId") String communityId) |
| | | { |
| | | return orderService.expurgateData(id,communityId); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | int num=baseMapper.editData(orderVO); |
| | | if(num>0) |
| | | { |
| | | // JinhuiCoinGeneralTable generalTable=tableService.getDetails(order.getUserId()); |
| | | // |
| | | // int allMoney=0; |
| | | // int getMoney=Integer.valueOf(order.getPalyMoney()); |
| | | // |
| | | // if(!StringUtils.isEmpty(generalTable.getGoldCoin())) |
| | | // { |
| | | // allMoney=Integer.valueOf(generalTable.getGoldCoin()); |
| | | // } |
| | | // |
| | | // //修改个人金汇币总额 |
| | | // allMoney=allMoney+getMoney; |
| | | // JinhuiCoinGeneralTableVO generalTableVO=new JinhuiCoinGeneralTableVO(); |
| | | // generalTableVO.setId(generalTable.getId()); |
| | | // generalTableVO.setGoldCoin(allMoney+""); |
| | | // tableService.editData(generalTableVO); |
| | | // |
| | | // //增加兑换记录 |
| | | // JinhuiGoldCoinRecordVO recordVO=new JinhuiGoldCoinRecordVO(); |
| | | // recordVO.setTitle("商品订单取消"); |
| | | // recordVO.setType("3"); |
| | | // recordVO.setUserId(order.getUserId()); |
| | | // recordVO.setGoldCoin(getMoney+""); |
| | | // goldCoinRecordService.addData(recordVO); |
| | | // 查询用户积分账户 |
| | | ComActIntegralUser integralUserDO = |
| | | integralUsersService.getOne(new QueryWrapper<ComActIntegralUser>().lambda() |
| | | .eq(ComActIntegralUser::getUserId, order.getUserId()) |
| | | .eq(ComActIntegralUser::getCommunityId, order.getCommunityId())); |
| | | |
| | | int allMoney=0; |
| | | int getMoney=Integer.valueOf(order.getPalyMoney()); |
| | | |
| | | allMoney=integralUserDO.getIntegralAvailableSum(); |
| | | |
| | | //修改个人金汇币总额 |
| | | allMoney=allMoney+getMoney; |
| | | |
| | | NewFightIntegral integral=new NewFightIntegral(); |
| | | |
| | | integral.setIntegralNum(allMoney+""); |
| | | integral.setAddOrReduce(1); |
| | | integral.setCommunityId(order.getCommunityId()); |
| | | integral.setUserId(order.getUserId()); |
| | | integral.setType("9"); |
| | | integral.setIdentityType("1"); |
| | | integral.setRemark("积分兑换商品取消"); |
| | | integralUsersService.upIntegral(integral); |
| | | |
| | | |
| | | return R.ok(); |
| | | } |