| | |
| | | @ApiModelProperty(value = "商品id") |
| | | private String goodsId; |
| | | |
| | | @ApiModelProperty(value = "订单状态") |
| | | @ApiModelProperty(value = "订单状态(1待发货 2待收货/待自提 3已完成 4 已取消 )") |
| | | private String orderType; |
| | | |
| | | @ApiModelProperty(value = "消费积分") |
| | |
| | | private String integralType; |
| | | |
| | | /** |
| | | * 增加1 减少 0 |
| | | */ |
| | | @ApiModelProperty(value = "增加1 减少 0") |
| | | private String type; |
| | | |
| | | /** |
| | | * 积分状态(1开门 2兑换) |
| | | */ |
| | | @ApiModelProperty(value = "积分") |
| | |
| | | package com.panzhihua.common.model.dtos.equipment; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | @Data |
| | | @ApiModel("总工会户外劳工站") |
| | | public class UnionUserDto extends BaseController { |
| | | public class UnionUserDto { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | public R unionIntegralRecordGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "integralTyppe",required = false) String integralTyppe, |
| | | @RequestParam(value = "integralType",required = false) String integralType, |
| | | @RequestParam(value = "nameOrNum",required = false) String nameOrNum); |
| | | |
| | | @GetMapping("/UnionIntegralRecord/getData") |
| | |
| | | @GetMapping("/UnionIntegralSummarize/getList") |
| | | public R unionIntegralSummarizeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("userId") String userId, |
| | | @RequestParam(value = "communityId",required = false) String communityId); |
| | | |
| | | |
| | | @GetMapping("/UnionIntegralSummarize/getData") |
| | | public R unionIntegralSummarizeGetData(@RequestParam("id") String id); |
| | | |
| | | |
| | | @GetMapping("/UnionIntegralSummarize/getUserData") |
| | | public R unionIntegralSummarizeGetUserData(); |
| | | |
| | | @PostMapping("/UnionIntegralSummarize/insert") |
| | | public R unionIntegralSummarizeInsert(@RequestBody UnionIntegralSummarizeDto item); |
| | |
| | | @GetMapping("/UnionExchangeRecord/getList") |
| | | public R unionExchangeRecordGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "integralTyppe",required = false) String userId); |
| | | @RequestParam(value = "communityId",required = false) String communityId); |
| | | |
| | | |
| | | @GetMapping("/UnionExchangeRecord/getData") |
| | |
| | | @GetMapping("/UnionShippingAddress/getList") |
| | | public R unionShippingAddressGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "integralTyppe",required = false) String userId); |
| | | @RequestParam(value = "communityId",required = false) String communityId); |
| | | |
| | | |
| | | @GetMapping("/UnionShippingAddress/getData") |
| | | public R unionShippingAddressGetData(@RequestParam("id") String id); |
| | | |
| | | |
| | | @GetMapping("/UnionShippingAddress/getDefaultData") |
| | | public R unionShippingAddressGetDefaultData(); |
| | | |
| | | @PostMapping("/UnionShippingAddress/insert") |
| | | public R unionShippingAddressInsert(@RequestBody UnionShippingAddressDto item); |
| | | |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionExchangeRecordDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityUnionService; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/UnionExchangeRecord") |
| | | public class UnionExchangeRecordApi extends BaseController |
| | | public class UnionExchangeRecordApi |
| | | { |
| | | @Resource |
| | | private CommunityUnionService unionStoreService; |
| | | |
| | | @ApiOperation(value = "兑换记录列表") |
| | | @ApiOperation(value = "兑换记录列表", response = UnionExchangeRecordDto.class) |
| | | @GetMapping("/getList") |
| | | public R unionExchangeRecordGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "integralTyppe",required = false) String userId) |
| | | @RequestParam(value = "communityId",required = false) String communityId) |
| | | { |
| | | return unionStoreService.unionExchangeRecordGetList(pageNum,pageSize,communityId,userId); |
| | | return unionStoreService.unionExchangeRecordGetList(pageNum,pageSize,communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "兑换记录单个详情") |
| | | @ApiOperation(value = "兑换记录单个详情",response = UnionExchangeRecordDto.class) |
| | | @GetMapping("/getData") |
| | | public R unionExchangeRecordGetData(@RequestParam("id") String id) |
| | | { |
| | |
| | | @PostMapping("/insert") |
| | | public R unionExchangeRecordInsert(@RequestBody UnionExchangeRecordDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionExchangeRecordInsert(item); |
| | | } |
| | | |
| | |
| | | @PostMapping("/update") |
| | | public R unionExchangeRecordUpdate(@RequestBody UnionExchangeRecordDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionExchangeRecordUpdate(item); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "添加物流公司") |
| | | @PostMapping("/addLogistics") |
| | | public R unionExchangeRecordAddLogistics(@RequestBody UnionExchangeRecordDto item) |
| | | { |
| | | if(StringUtils.isEmpty(item.getLogisticsCompany())) |
| | | { |
| | | return R.fail("请输入物流公司"); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(item.getLogisticsNum())) |
| | | { |
| | | return R.fail("请输入物流单号"); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(item.getId())) |
| | | { |
| | | return R.fail("订单id不能为空"); |
| | | } |
| | | item.setOrderType("2"); |
| | | return unionStoreService.unionExchangeRecordUpdate(item); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "添加物流公司") |
| | | @PostMapping("/confirmOrder") |
| | | public R unionExchangeRecordConfirmOrder(@RequestBody UnionExchangeRecordDto item) |
| | | { |
| | | if (StringUtils.isEmpty(item.getId())) |
| | | { |
| | | return R.fail("订单id不能为空"); |
| | | } |
| | | item.setOrderType("3"); |
| | | return unionStoreService.unionExchangeRecordUpdate(item); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除接口 |
| | | * @param id |
| | |
| | | @Api(tags = {"户外劳工站巡查"}) |
| | | @RestController |
| | | @RequestMapping("/unionInspection") |
| | | public class UnionInspectionApi extends BaseController { |
| | | public class UnionInspectionApi{ |
| | | |
| | | @Resource |
| | | private CommunityUnionService communityUnionService; |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionExchangeRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralRecordDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityUnionService; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/UnionIntegralRecord") |
| | | public class UnionIntegralRecordApi extends BaseController |
| | | public class UnionIntegralRecordApi |
| | | { |
| | | @Resource |
| | | private CommunityUnionService unionStoreService; |
| | | |
| | | @ApiOperation(value = "积分明细列表") |
| | | @ApiOperation(value = "积分明细列表", response = UnionIntegralRecordDto.class) |
| | | @GetMapping("/getList") |
| | | public R unionIntegralRecordGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "integralTyppe",required = false) String integralTyppe, |
| | | @RequestParam(value = "integralType",required = false) String integralType, |
| | | @RequestParam(value = "nameOrNum",required = false) String nameOrNum) |
| | | { |
| | | return unionStoreService.unionIntegralRecordGetList(pageNum,pageSize,communityId,integralTyppe,nameOrNum); |
| | | return unionStoreService.unionIntegralRecordGetList(pageNum,pageSize,communityId,integralType,nameOrNum); |
| | | } |
| | | |
| | | @ApiOperation(value = "积分明细单个详情") |
| | | @ApiOperation(value = "积分明细单个详情", response = UnionIntegralRecordDto.class) |
| | | @GetMapping("/getData") |
| | | public R unionIntegralRecordGetData(@RequestParam("id") String id) |
| | | { |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralSummarizeDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityUnionService; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/UnionIntegralSummarize") |
| | | public class UnionIntegralSummarizeApi extends BaseController |
| | | public class UnionIntegralSummarizeApi |
| | | { |
| | | @Resource |
| | | private CommunityUnionService unionStoreService; |
| | | |
| | | @ApiOperation(value = "积分明细列表") |
| | | @ApiOperation(value = "积分明细列表", response = UnionIntegralSummarizeDto.class) |
| | | @GetMapping("/getList") |
| | | public R unionIntegralSummarizeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId) |
| | | { |
| | | return unionStoreService.unionIntegralSummarizeGetList(pageNum,pageSize,communityId,getUserId()+""); |
| | | return unionStoreService.unionIntegralSummarizeGetList(pageNum,pageSize,communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "积分明细单个详情") |
| | | @ApiOperation(value = "积分明细单个详情", response = UnionIntegralSummarizeDto.class) |
| | | @GetMapping("/getData") |
| | | public R unionIntegralSummarizeGetData(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.unionIntegralSummarizeGetData(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "个人积分总数详情", response = UnionIntegralSummarizeDto.class) |
| | | @GetMapping("/getUserData") |
| | | public R unionIntegralSummarizeGetUserData() |
| | | { |
| | | return unionStoreService.unionIntegralSummarizeGetUserData(); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增积分明细") |
| | | |
| | | @ApiOperation(value = "新增用户积分") |
| | | @PostMapping("/insert") |
| | | public R unionIntegralSummarizeInsert(@RequestBody UnionIntegralSummarizeDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionIntegralSummarizeInsert(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改积分明细") |
| | | @ApiOperation(value = "修改用户积分") |
| | | @PostMapping("/update") |
| | | public R unionIntegralSummarizeUpdate(@RequestBody UnionIntegralSummarizeDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionIntegralSummarizeUpdate(item); |
| | | } |
| | | |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "删除积分明细") |
| | | @ApiOperation(value = "删除用户积分") |
| | | @DeleteMapping("/delete") |
| | | public R unionIntegralSummarizeDelete(@RequestParam("id") String id) |
| | | { |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/unionOutdoorLaborDynamic") |
| | | public class UnionOutdoorLaborDynamicApi extends BaseController { |
| | | public class UnionOutdoorLaborDynamicApi{ |
| | | |
| | | @Resource |
| | | private CommunityUnionService communityUnionService; |
| | |
| | | @Api(tags = {"总工会户外劳工站"}) |
| | | @RestController |
| | | @RequestMapping("/unionOutdoorSite") |
| | | public class UnionOutdoorSiteApi extends BaseController { |
| | | public class UnionOutdoorSiteApi{ |
| | | |
| | | @Resource |
| | | private CommunityUnionService communityUnionService; |
| | |
| | | @Api(tags = {"户外劳工站"}) |
| | | @RestController |
| | | @RequestMapping("/unionReport") |
| | | public class UnionReportApi extends BaseController { |
| | | public class UnionReportApi{ |
| | | |
| | | @Resource |
| | | private CommunityUnionService communityUnionService; |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralSummarizeDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionShippingAddressDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityUnionService; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/UnionShippingAddress") |
| | | public class UnionShippingAddressApi extends BaseController |
| | | public class UnionShippingAddressApi |
| | | { |
| | | @Resource |
| | | private CommunityUnionService unionStoreService; |
| | | |
| | | @ApiOperation(value = "收货地址列表") |
| | | @ApiOperation(value = "收货地址列表", response = UnionShippingAddressDto.class) |
| | | @GetMapping("/getList") |
| | | public R unionShippingAddressGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "integralTyppe",required = false) String userId) |
| | | @RequestParam(value = "communityId",required = false) String communityId) |
| | | { |
| | | return unionStoreService.unionShippingAddressGetList(pageNum,pageSize,communityId,userId); |
| | | return unionStoreService.unionShippingAddressGetList(pageNum,pageSize,communityId); |
| | | } |
| | | |
| | | @ApiOperation(value = "收货地址单个详情") |
| | | @ApiOperation(value = "收货地址单个详情", response = UnionShippingAddressDto.class) |
| | | @GetMapping("/getData") |
| | | public R unionShippingAddressGetData(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.unionShippingAddressGetData(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取默认收货地址", response = UnionShippingAddressDto.class) |
| | | @GetMapping("/getDefaultData") |
| | | public R unionShippingAddressGetDefaultData() |
| | | { |
| | | return unionStoreService.unionShippingAddressGetDefaultData(); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增收货地址") |
| | | @PostMapping("/insert") |
| | | public R unionShippingAddressInsert(@RequestBody UnionShippingAddressDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionShippingAddressInsert(item); |
| | | } |
| | | |
| | |
| | | @PostMapping("/update") |
| | | public R unionShippingAddressUpdate(@RequestBody UnionShippingAddressDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionShippingAddressUpdate(item); |
| | | } |
| | | |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionShippingAddressDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionStoreDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.ComEquipmentUnionStoreLDD; |
| | |
| | | @Api(tags = {"商城商品相关"}) |
| | | @RestController |
| | | @RequestMapping("/UnionStore") |
| | | public class UnionStoreApi extends BaseController { |
| | | public class UnionStoreApi{ |
| | | |
| | | @Resource |
| | | private ComEquipmentUnionStoreLDD comEquipmentUnionStoreLDD; |
| | |
| | | * |
| | | * @return 总工会户外劳动商品列表 |
| | | */ |
| | | @ApiOperation(value = "总工会户外劳动商品列表") |
| | | @ApiOperation(value = "总工会户外劳动商品列表", response = UnionStoreDto.class) |
| | | @GetMapping("/getList") |
| | | public R getList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | |
| | | * |
| | | * @return 总工会户外劳动商品列表 |
| | | */ |
| | | @ApiOperation(value = "总工会户外劳动商品详情") |
| | | @ApiOperation(value = "总工会户外劳动商品详情", response = UnionStoreDto.class) |
| | | @GetMapping("/getData") |
| | | public R getData(String id) |
| | | { |
| | |
| | | @PostMapping("/insert") |
| | | public R insert(@RequestBody UnionStoreDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return comEquipmentUnionStoreLDD.insert(item); |
| | | } |
| | | |
| | |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody UnionStoreDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return comEquipmentUnionStoreLDD.insert(item); |
| | | } |
| | | |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionExchangeRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionUserDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.annotation.CurrentUser; |
| | | import com.panzhihua.service_equipment.service.UnionExchangeRecordService; |
| | | import com.panzhihua.service_equipment.service.UnionIntegralRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public R unionExchangeRecordGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "integralTyppe",required = false) String userId) |
| | | @CurrentUser UnionUserDto unionUser) |
| | | { |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,userId); |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,unionUser.getId()+""); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @PostMapping("/insert") |
| | | public R unionExchangeRecordInsert(@RequestBody UnionExchangeRecordDto item) |
| | | public R unionExchangeRecordInsert(@RequestBody UnionExchangeRecordDto item, @CurrentUser UnionUserDto unionUser) |
| | | { |
| | | item.setUserId(unionUser.getId()+""); |
| | | return unionStoreService.insert(item); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | public R unionExchangeRecordUpdate(@RequestBody UnionExchangeRecordDto item) |
| | | public R unionExchangeRecordUpdate(@RequestBody UnionExchangeRecordDto item,@CurrentUser UnionUserDto unionUser) |
| | | { |
| | | return unionStoreService.update(item); |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionStoreDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionUserDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.annotation.CurrentUser; |
| | | import com.panzhihua.service_equipment.service.UnionIntegralRecordService; |
| | | import com.panzhihua.service_equipment.service.UnionStoreService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | public R unionIntegralRecordGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "integralTyppe",required = false) String integralTyppe, |
| | | @RequestParam(value = "integralType",required = false) String integralType, |
| | | @RequestParam(value = "nameOrNum",required = false) String nameOrNum) |
| | | { |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,integralTyppe,nameOrNum); |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,integralType,nameOrNum); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @PostMapping("/insert") |
| | | public R unionIntegralRecordInsert(@RequestBody UnionIntegralRecordDto item) |
| | | public R unionIntegralRecordInsert(@RequestBody UnionIntegralRecordDto item, @CurrentUser UnionUserDto unionUser) |
| | | { |
| | | item.setUserId(unionUser.getId()+""); |
| | | return unionStoreService.insert(item); |
| | | } |
| | | |
| | |
| | | package com.panzhihua.service_equipment.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralSummarizeDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionUserDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.service.UnionIntegralRecordService; |
| | | import com.panzhihua.service_equipment.annotation.CurrentUser; |
| | | import com.panzhihua.service_equipment.service.UnionIntegralSummarizeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @GetMapping("/getList") |
| | | public R unionIntegralSummarizeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("userId") String userId, |
| | | @RequestParam(value = "communityId",required = false) String communityId) |
| | | @RequestParam(value = "communityId",required = false) String communityId,@CurrentUser UnionUserDto unionUser) |
| | | { |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,userId); |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,unionUser.getId()+""); |
| | | } |
| | | |
| | | |
| | |
| | | return unionStoreService.getData(id); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getUserData") |
| | | public R unionIntegralSummarizeGetUserData(@CurrentUser UnionUserDto unionUser) { |
| | | return unionStoreService.getUserData(unionUser.getId()+"",null); |
| | | } |
| | | |
| | | @PostMapping("/insert") |
| | | public R unionIntegralSummarizeInsert(@RequestBody UnionIntegralSummarizeDto item) |
| | | public R unionIntegralSummarizeInsert(@RequestBody UnionIntegralSummarizeDto item, @CurrentUser UnionUserDto unionUser) |
| | | { |
| | | item.setUserId(unionUser.getId()+""); |
| | | return unionStoreService.insert(item); |
| | | } |
| | | |
| | |
| | | package com.panzhihua.service_equipment.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionExchangeRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionShippingAddressDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionUserDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.service.UnionExchangeRecordService; |
| | | import com.panzhihua.service_equipment.annotation.CurrentUser; |
| | | import com.panzhihua.service_equipment.service.UnionShippingAddressService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | public R unionShippingAddressGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "integralTyppe",required = false) String userId) |
| | | @CurrentUser UnionUserDto unionUser) |
| | | { |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,userId); |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,unionUser.getId()+""); |
| | | } |
| | | |
| | | |
| | |
| | | return unionStoreService.getData(id); |
| | | } |
| | | |
| | | @PostMapping("/insert") |
| | | public R unionShippingAddressInsert(@RequestBody UnionShippingAddressDto item) |
| | | |
| | | @GetMapping("/getDefaultData") |
| | | public R unionShippingAddressGetDefaultData(@CurrentUser UnionUserDto unionUser) |
| | | { |
| | | return unionStoreService.getDefaultData(unionUser.getId()+""); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/insert") |
| | | public R unionShippingAddressInsert(@RequestBody UnionShippingAddressDto item, @CurrentUser UnionUserDto unionUser) |
| | | { |
| | | item.setUserId(unionUser.getId()+""); |
| | | return unionStoreService.insert(item); |
| | | } |
| | | |
| | |
| | | package com.panzhihua.service_equipment.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionStoreDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionUserDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.annotation.CurrentUser; |
| | | import com.panzhihua.service_equipment.service.UnionStoreService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,goodsType,nameOrNum); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getData") |
| | | public R getData(@RequestParam("id") String id) |
| | | { |
| | |
| | | |
| | | |
| | | @PostMapping("/insert") |
| | | public R insert(@RequestBody UnionStoreDto item) |
| | | public R insert(@RequestBody UnionStoreDto item, @CurrentUser UnionUserDto unionUser) |
| | | { |
| | | item.setUserId(unionUser.getId()+""); |
| | | item.setCommunityId(unionUser.getAreaCode()+""); |
| | | return unionStoreService.insert(item); |
| | | } |
| | | |
| | |
| | | |
| | | IPage<UnionIntegralRecord> getList(Page page, |
| | | @Param("communityId") String communityId, |
| | | @Param("integralTyppe") String integralTyppe, |
| | | @Param("integralType") String integralType, |
| | | @Param("nameOrNum") String nameOrNum); |
| | | |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralSummarizeDto; |
| | | import com.panzhihua.service_equipment.model.dos.UnionIntegralRecord; |
| | | import com.panzhihua.service_equipment.model.dos.UnionIntegralSummarize; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | @Param("userId") String userId); |
| | | |
| | | |
| | | UnionIntegralRecord getData(@Param("id") String id); |
| | | UnionIntegralSummarize getData(@Param("id") String id); |
| | | |
| | | |
| | | UnionIntegralSummarize getUserData(@Param("userId") String userId, |
| | | @Param("communityId") String communityId); |
| | | |
| | | int insert(@Param("item") UnionIntegralSummarizeDto item); |
| | | |
| | |
| | | @Param("userId") String userId); |
| | | |
| | | |
| | | UnionExchangeRecord getData(@Param("id") String id); |
| | | UnionShippingAddress getData(@Param("id") String id); |
| | | |
| | | |
| | | UnionShippingAddress getDefaultData(@Param("userId") String userId); |
| | | |
| | | int insert(@Param("item") UnionShippingAddressDto item); |
| | | |
| | |
| | | @ApiModelProperty(value = "商品id") |
| | | private String goodsId; |
| | | |
| | | @ApiModelProperty(value = "订单状态") |
| | | @ApiModelProperty(value = "订单状态(1待发货 2待收货/待自提 3已完成 4 已取消)") |
| | | private String orderType; |
| | | |
| | | @ApiModelProperty(value = "消费积分") |
| | |
| | | private String integral; |
| | | |
| | | /** |
| | | * 增加1 减少 0 |
| | | */ |
| | | @ApiModelProperty(value = "增加1 减少 0") |
| | | private String type; |
| | | |
| | | /** |
| | | * 用户姓名 |
| | | */ |
| | | @TableField(exist = false) |
| | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主键id") |
| | | private String id; |
| | | /** |
| | |
| | | package com.panzhihua.service_equipment.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionExchangeRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralRecordDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.model.dos.UnionExchangeRecord; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface UnionExchangeRecordService |
| | | { |
| | | R getList(int pageNum,int pageSize, String communityId,String userId); |
| | | R<IPage<UnionExchangeRecord>> getList(int pageNum, int pageSize, String communityId, String userId); |
| | | |
| | | R getData(String id); |
| | | R<UnionExchangeRecord> getData(String id); |
| | | |
| | | R insert(UnionExchangeRecordDto item); |
| | | |
| | |
| | | package com.panzhihua.service_equipment.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralRecordDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.model.dos.UnionIntegralRecord; |
| | | |
| | | public interface UnionIntegralRecordService |
| | | { |
| | | R getList(int pageNum,int pageSize, String communityId, String integralTyppe, String nameOrNum); |
| | | R<IPage<UnionIntegralRecord>> getList(int pageNum, int pageSize, String communityId, String integralType, String nameOrNum); |
| | | |
| | | R getData(String id); |
| | | R<UnionIntegralRecord> getData(String id); |
| | | |
| | | R insert(UnionIntegralRecordDto item); |
| | | |
| | |
| | | package com.panzhihua.service_equipment.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralSummarizeDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.model.dos.UnionIntegralSummarize; |
| | | |
| | | public interface UnionIntegralSummarizeService |
| | | { |
| | | R getList(int pageNum,int pageSize, String communityId, String userId); |
| | | R<IPage<UnionIntegralSummarize>> getList(int pageNum, int pageSize, String communityId, String userId); |
| | | |
| | | R getData(String id); |
| | | R<UnionIntegralSummarize> getData(String id); |
| | | |
| | | R<UnionIntegralSummarize> getUserData(String userId,String communityId); |
| | | |
| | | R insert(UnionIntegralSummarizeDto item); |
| | | |
| | |
| | | package com.panzhihua.service_equipment.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionShippingAddressDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.model.dos.UnionShippingAddress; |
| | | |
| | | public interface UnionShippingAddressService |
| | | { |
| | | R getList(int pageNum,int pageSize, String communityId,String userId); |
| | | R<IPage<UnionShippingAddress>> getList(int pageNum, int pageSize, String communityId, String userId); |
| | | |
| | | R getData(String id); |
| | | R<UnionShippingAddress> getData(String id); |
| | | |
| | | R<UnionShippingAddress> getDefaultData(String userId); |
| | | |
| | | R insert(UnionShippingAddressDto item); |
| | | |
| | |
| | | package com.panzhihua.service_equipment.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionStoreDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.model.dos.UnionStore; |
| | |
| | | |
| | | public interface UnionStoreService |
| | | { |
| | | R getList(int pageNum,int pageSize, String communityId, String goodsType, String nameOrNum); |
| | | R<IPage<UnionStore>> getList(int pageNum, int pageSize, String communityId, String goodsType, String nameOrNum); |
| | | |
| | | |
| | | R getData(String id); |
| | | R<UnionStore> getData(String id); |
| | | |
| | | R insert(UnionStoreDto item); |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionExchangeRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralSummarizeDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionStoreDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_equipment.dao.UnionExchangeRecordMapper; |
| | | import com.panzhihua.service_equipment.model.dos.UnionExchangeRecord; |
| | | import com.panzhihua.service_equipment.model.dos.UnionIntegralSummarize; |
| | | import com.panzhihua.service_equipment.model.dos.UnionStore; |
| | | import com.panzhihua.service_equipment.service.UnionExchangeRecordService; |
| | | import com.panzhihua.service_equipment.service.UnionIntegralRecordService; |
| | | import com.panzhihua.service_equipment.service.UnionIntegralSummarizeService; |
| | | import com.panzhihua.service_equipment.service.UnionStoreService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | @Service |
| | |
| | | public class UnionExchangeRecordServiceImpl extends ServiceImpl<UnionExchangeRecordMapper, UnionExchangeRecord> |
| | | implements UnionExchangeRecordService |
| | | { |
| | | @Resource |
| | | private UnionStoreService unionStoreService; |
| | | |
| | | @Resource |
| | | private UnionIntegralSummarizeService unionIntegralSummarizeService; |
| | | |
| | | @Resource |
| | | private UnionIntegralRecordService unionIntegralRecordService; |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize, String communityId, String userId) |
| | |
| | | @Override |
| | | public R insert(UnionExchangeRecordDto item) |
| | | { |
| | | if(StringUtils.isEmpty(item.getConsignee())) |
| | | { |
| | | return R.fail("收货信息不能为空"); |
| | | } |
| | | |
| | | R<UnionIntegralSummarize> unionIntegralSummarizeR=unionIntegralSummarizeService.getUserData(item.getUserId(),null); |
| | | //设置站点id |
| | | item.setCommunityId(unionIntegralSummarizeR.getData().getCommunityId()); |
| | | |
| | | R<UnionStore> unionStoreR = unionStoreService.getData(item.getGoodsId()); |
| | | //库存 |
| | | int stock = Integer.valueOf(unionStoreR.getData().getStock()); |
| | | //购买数量 |
| | | int goodNum = Integer.valueOf(item.getGoodsNum()); |
| | | //单价 |
| | | int conversionPrice = Integer.valueOf(unionStoreR.getData().getConversionPrice()); |
| | | |
| | | if (stock<goodNum) |
| | | { |
| | | return R.fail("商品库存不足!"); |
| | | } |
| | | |
| | | int allPrice=goodNum*conversionPrice; |
| | | |
| | | if(Integer.valueOf(unionIntegralSummarizeR.getData().getAllIntegral())<allPrice) |
| | | { |
| | | return R.fail("用户积分不足!"); |
| | | } |
| | | |
| | | //扣除用户积分 |
| | | int num1=Integer.valueOf(unionIntegralSummarizeR.getData().getAllIntegral())-allPrice; |
| | | UnionIntegralSummarizeDto dto=new UnionIntegralSummarizeDto(); |
| | | dto.setId(unionIntegralSummarizeR.getData().getId()); |
| | | dto.setAllIntegral(num1+""); |
| | | unionIntegralSummarizeService.update(dto); |
| | | |
| | | |
| | | //修改商品库存 |
| | | UnionStoreDto unionStoreDto=new UnionStoreDto(); |
| | | unionStoreDto.setId(unionStoreR.getData().getId()); |
| | | stock=stock-goodNum; |
| | | unionStoreDto.setStock(stock+""); |
| | | unionStoreService.update(unionStoreDto); |
| | | |
| | | //新增积分明细记录 |
| | | UnionIntegralRecordDto unionIntegralRecordDto=new UnionIntegralRecordDto(); |
| | | unionIntegralRecordDto.setIntegral(allPrice+""); |
| | | unionIntegralRecordDto.setIntegralType("2"); |
| | | unionIntegralRecordDto.setUserId(item.getUserId()); |
| | | unionIntegralRecordDto.setCommunityId(unionIntegralSummarizeR.getData().getCommunityId()); |
| | | unionIntegralRecordDto.setType("0"); |
| | | unionIntegralRecordService.insert(unionIntegralRecordDto); |
| | | |
| | | |
| | | item.setOrderNum(Snowflake.getId()+""); |
| | | item.setOrderType("1"); |
| | | item.setPlayIntegral(allPrice+""); |
| | | |
| | | int num= baseMapper.insert(item); |
| | | if(num>0) |
| | | { |
| | |
| | | @Override |
| | | public R delete(String id) |
| | | { |
| | | UnionExchangeRecord unionExchangeRecord=baseMapper.getData(id); |
| | | |
| | | if(StringUtils.equals("3",unionExchangeRecord.getOrderType()) |
| | | || StringUtils.equals("4",unionExchangeRecord.getOrderType()) ) |
| | | { |
| | | return R.fail("订单不能删除"); |
| | | } |
| | | |
| | | int num= baseMapper.delete(id); |
| | | if(num>0) |
| | | { |
| | |
| | | { |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize, String communityId, String integralTyppe, String nameOrNum) |
| | | public R getList(int pageNum,int pageSize, String communityId, String integralType, String nameOrNum) |
| | | { |
| | | Page page=new Page(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,communityId,integralTyppe,nameOrNum)); |
| | | return R.ok(baseMapper.getList(page,communityId,integralType,nameOrNum)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getUserData(String userId, String communityId) { |
| | | return R.ok(baseMapper.getUserData(userId,communityId)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(UnionIntegralSummarizeDto item) |
| | | { |
| | | int num= baseMapper.insert(item); |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionShippingAddressDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_equipment.dao.UnionShippingAddressMapper; |
| | | import com.panzhihua.service_equipment.model.dos.UnionShippingAddress; |
| | | import com.panzhihua.service_equipment.service.UnionShippingAddressService; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R<UnionShippingAddress> getDefaultData(String userId) { |
| | | return R.ok(baseMapper.getDefaultData(userId)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(UnionShippingAddressDto item) |
| | | { |
| | | if(StringUtils.equals("true",item.getIsDefault())) |
| | | { |
| | | UnionShippingAddress unionShippingAddress=baseMapper.getDefaultData(item.getUserId()); |
| | | if(unionShippingAddress!=null) |
| | | { |
| | | UnionShippingAddressDto dto=new UnionShippingAddressDto(); |
| | | dto.setId(unionShippingAddress.getId()); |
| | | dto.setIsDefault("false"); |
| | | baseMapper.update(dto); |
| | | } |
| | | } |
| | | |
| | | int num= baseMapper.insert(item); |
| | | if(num>0) |
| | | { |
| | |
| | | package com.panzhihua.service_equipment.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionStoreDto; |
| | |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class UnionStoreServiceImpl extends ServiceImpl<UnionStoreMapper, UnionStore> implements UnionStoreService |
| | | public class UnionStoreServiceImpl extends ServiceImpl<UnionStoreMapper, UnionStore> implements UnionStoreService |
| | | { |
| | | |
| | | @Override |
| | |
| | | id, |
| | | order_num, |
| | | user_id, |
| | | (select su.name from sys_user as su where su.user_id=union_integral_record.user_id) as usserName, |
| | | (select su.phone from sys_user as su where su.user_id=union_integral_record.user_id) as phone, |
| | | (select su.name from union_user as su where su.id=union_exchange_record.user_id) as userName, |
| | | (select su.phone from union_user as su where su.id=union_exchange_record.user_id) as phone, |
| | | goods_id, |
| | | order_type, |
| | | consumption_points, |
| | |
| | | <result property="userId" column="user_id"/> |
| | | <result property="integralType" column="integral_type"/> |
| | | <result property="integral" column="integral"/> |
| | | <result property="type" column="type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="base_sql"> |
| | |
| | | integral_type, |
| | | integral, |
| | | user_id, |
| | | (select su.name from sys_user as su where su.user_id=union_integral_record.user_id) as usserName, |
| | | (select su.phone from sys_user as su where su.user_id=union_integral_record.user_id) as phone, |
| | | (select su.name from union_user as su where su.id=union_integral_record.user_id) as usserName, |
| | | (select su.phone from union_user as su where su.id=union_integral_record.user_id) as phone, |
| | | create_time, |
| | | update_time, |
| | | `type`, |
| | | community_id |
| | | </sql> |
| | | |
| | |
| | | <insert id="insert"> |
| | | insert into union_integral_record |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id, |
| | | </if> |
| | | <if test="item.integralType != null"> |
| | | <if test="item.integralType != null and item.integralType != '' "> |
| | | integral_type, |
| | | </if> |
| | | <if test="item.integral != null"> |
| | | <if test="item.integral != null and item.integral != '' "> |
| | | integral, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | community_id, |
| | | </if> |
| | | <if test="item.type != null and item.type != '' "> |
| | | `type`, |
| | | </if> |
| | | create_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | <if test="item.id != null and item.id != '' "> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.integralTyppe != null"> |
| | | <if test="item.integralTyppe != null and item.integralTyppe != '' "> |
| | | #{item.integralTyppe}, |
| | | </if> |
| | | <if test="item.integral != null"> |
| | | <if test="item.integral != null and item.integral != '' "> |
| | | #{item.integral}, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | #{item.communityId}, |
| | | </if> |
| | | <if test="item.type != null and item.type != '' "> |
| | | #{item.type}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | |
| | | <update id="update"> |
| | | update union_integral_record |
| | | <set> |
| | | <if test="item.id != null"> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.integralType != null"> |
| | | <if test="item.integralType != null and item.integralType != '' "> |
| | | integral_type=#{item.integralType}, |
| | | </if> |
| | | <if test="item.integral != null"> |
| | | <if test="item.integral != null and item.integral != '' "> |
| | | integral=#{item.integral}, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | community_id=#{item.communityId}, |
| | | </if> |
| | | <if test="item.type != null and item.type != '' "> |
| | | `type`=#{item.type}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | |
| | | id, |
| | | all_integral, |
| | | user_id, |
| | | (select su.name from sys_user as su where su.user_id=union_integral_record.user_id) as usserName, |
| | | (select su.phone from sys_user as su where su.user_id=union_integral_record.user_id) as phone, |
| | | (select su.name from union_user as su where su.id=union_integral_summarize.user_id) as userName, |
| | | (select su.phone from union_user as su where su.id=union_integral_summarize.user_id) as phone, |
| | | create_time, |
| | | update_time, |
| | | community_id |
| | |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getUserData" resultMap="UnionIntegralSummarizeMap"> |
| | | select |
| | | id, |
| | | all_integral, |
| | | user_id, |
| | | (select su.name from union_user as su where su.id=union_integral_summarize.user_id) as userName, |
| | | (select su.phone from union_user as su where su.id=union_integral_summarize.user_id) as phone, |
| | | create_time, |
| | | update_time, |
| | | community_id |
| | | from union_integral_summarize |
| | | <where> |
| | | 1=1 |
| | | <if test="userId!=null and userId != '' "> |
| | | and user_id=#{userId} |
| | | </if> |
| | | <if test="communityId!=null and communityId != '' "> |
| | | and community_id=#{communityId} |
| | | </if> |
| | | </where> |
| | | order BY all_integral DESC limit 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="getList" resultMap="UnionIntegralSummarizeMap"> |
| | | select <include refid="base_sql"/> |
| | | from union_integral_summarize |
| | |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getDefaultData" resultMap="ItemMap"> |
| | | select <include refid="base_sql"/> |
| | | from union_shipping_address |
| | | where user_id=#{userId} and is_default='true' |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getList" resultMap="ItemMap"> |
| | | select <include refid="base_sql"/> |
| | | from union_shipping_address |
| | |
| | | <insert id="insert"> |
| | | insert into union_shipping_address |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | id, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | community_id, |
| | | </if> |
| | | <if test="item.lat != null"> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | lat, |
| | | </if> |
| | | <if test="item.lng != null"> |
| | | <if test="item.lng != null and item.lng != '' "> |
| | | lng, |
| | | </if> |
| | | <if test="item.address != null"> |
| | | <if test="item.address != null and item.address != '' "> |
| | | address, |
| | | </if> |
| | | <if test="item.phone != null"> |
| | | <if test="item.phone != null and item.phone != '' "> |
| | | phone, |
| | | </if> |
| | | <if test="item.name != null"> |
| | | <if test="item.name != null and item.name != '' "> |
| | | `name`, |
| | | </if> |
| | | <if test="item.isDefault != null"> |
| | | <if test="item.isDefault != null and item.isDefault != '' "> |
| | | is_default, |
| | | </if> |
| | | <if test="item.gender != null"> |
| | | <if test="item.gender != null and item.gender != '' "> |
| | | gender, |
| | | </if> |
| | | <if test="item.houseNum != null"> |
| | | <if test="item.houseNum != null and item.houseNum != '' "> |
| | | house_num, |
| | | </if> |
| | | <if test="item.city != null"> |
| | | <if test="item.city != null and item.city != '' "> |
| | | city, |
| | | </if> |
| | | create_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | #{item.communityId}, |
| | | </if> |
| | | <if test="item.lat != null"> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | #{item.lat}, |
| | | </if> |
| | | <if test="item.lng != null"> |
| | | <if test="item.lng != null and item.lng != '' "> |
| | | #{item.lng}, |
| | | </if> |
| | | <if test="item.address != null"> |
| | | <if test="item.address != null and item.address != '' "> |
| | | #{item.address}, |
| | | </if> |
| | | <if test="item.phone != null"> |
| | | <if test="item.phone != null and item.phone != '' "> |
| | | #{item.phone}, |
| | | </if> |
| | | <if test="item.name != null"> |
| | | <if test="item.name != null and item.name != '' "> |
| | | #{item.name}, |
| | | </if> |
| | | <if test="item.isDefault != null"> |
| | | <if test="item.isDefault != null and item.isDefault != '' "> |
| | | #{item.isDefault}, |
| | | </if> |
| | | <if test="item.gender != null"> |
| | | <if test="item.gender != null and item.gender != '' "> |
| | | #{item.gender}, |
| | | </if> |
| | | <if test="item.houseNum != null"> |
| | | <if test="item.houseNum != null and item.houseNum != '' "> |
| | | #{item.houseNum}, |
| | | </if> |
| | | <if test="item.city != null"> |
| | | <if test="item.city != null and item.city != '' "> |
| | | #{item.city}, |
| | | </if> |
| | | |
| | |
| | | <update id="update"> |
| | | update union_shipping_address |
| | | <set> |
| | | <if test="item.id != null"> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | community_id=#{item.communityId}, |
| | | </if> |
| | | <if test="item.lat != null"> |
| | | <if test="item.lat != null and item.lat != '' "> |
| | | lat=#{item.lat}, |
| | | </if> |
| | | <if test="item.lng != null"> |
| | | <if test="item.lng != null and item.lng != '' "> |
| | | lng=#{item.lng}, |
| | | </if> |
| | | <if test="item.address != null"> |
| | | <if test="item.address != null and item.address != '' "> |
| | | address=#{item.address}, |
| | | </if> |
| | | <if test="item.phone != null"> |
| | | <if test="item.phone != null and item.phone != '' "> |
| | | phone=#{item.phone}, |
| | | </if> |
| | | <if test="item.name != null"> |
| | | <if test="item.name != null and item.name != '' "> |
| | | `name`=#{item.name}, |
| | | </if> |
| | | <if test="item.isDefault != null"> |
| | | <if test="item.isDefault != null and item.isDefault != '' "> |
| | | is_default=#{item.isDefault}, |
| | | </if> |
| | | <if test="item.gender != null"> |
| | | <if test="item.gender != null and item.gender != '' "> |
| | | gender=#{item.gender}, |
| | | </if> |
| | | <if test="item.houseNum != null"> |
| | | <if test="item.houseNum != null and item.houseNum != '' "> |
| | | house_num=#{item.houseNum}, |
| | | </if> |
| | | <if test="item.city != null"> |
| | | <if test="item.city != null and item.city != '' "> |
| | | city=#{item.city}, |
| | | </if> |
| | | update_time=sysdate() |