| | |
| | | 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 { |
| | | public class UnionUserDto extends BaseController { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @RequestParam(value = "goodsType",required = false) String goodsType, |
| | | @RequestParam(value = "nameOrNum",required = false) String nameOrNum); |
| | | |
| | | |
| | | @GetMapping("/getData") |
| | | public R getData(@RequestParam("id")String id); |
| | | |
| | | @PostMapping("/insert") |
| | | public R insert(@RequestBody UnionStoreDto item); |
| | | |
New file |
| | |
| | | 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 io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Api(tags = {"兑换记录"}) |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/UnionExchangeRecord") |
| | | public class UnionExchangeRecordApi extends BaseController |
| | | { |
| | | @Resource |
| | | private CommunityUnionService unionStoreService; |
| | | |
| | | @ApiOperation(value = "兑换记录列表") |
| | | @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) |
| | | { |
| | | return unionStoreService.unionExchangeRecordGetList(pageNum,pageSize,communityId,userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "兑换记录单个详情") |
| | | @GetMapping("/getData") |
| | | public R unionExchangeRecordGetData(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.unionExchangeRecordGetData(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "新增兑换记录") |
| | | @PostMapping("/insert") |
| | | public R unionExchangeRecordInsert(@RequestBody UnionExchangeRecordDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionExchangeRecordInsert(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改兑换记录") |
| | | @PostMapping("/update") |
| | | public R unionExchangeRecordUpdate(@RequestBody UnionExchangeRecordDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionExchangeRecordUpdate(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除接口 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "删除兑换记录") |
| | | @DeleteMapping("/delete") |
| | | public R unionExchangeRecordDelete(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.unionExchangeRecordDelete(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionInspectionDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionUserDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | |
| | | @Api(tags = {"户外劳工站巡查"}) |
| | | @RestController |
| | | @RequestMapping("/unionInspection") |
| | | public class UnionInspectionApi { |
| | | public class UnionInspectionApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityUnionService communityUnionService; |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | 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 |
| | | public class UnionIntegralRecordApi extends BaseController |
| | | { |
| | | @Resource |
| | | private CommunityUnionService unionStoreService; |
| | |
| | | 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 |
| | | public class UnionIntegralSummarizeApi extends BaseController |
| | | { |
| | | @Resource |
| | | private CommunityUnionService unionStoreService; |
| | |
| | | @GetMapping("/getList") |
| | | public R unionIntegralSummarizeGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam("userId") String userId, |
| | | @RequestParam(value = "communityId",required = false) String communityId) |
| | | { |
| | | return unionStoreService.unionIntegralSummarizeGetList(pageNum,pageSize,communityId,userId); |
| | | return unionStoreService.unionIntegralSummarizeGetList(pageNum,pageSize,communityId,getUserId()+""); |
| | | } |
| | | |
| | | @ApiOperation(value = "积分明细单个详情") |
| | |
| | | @PostMapping("/insert") |
| | | public R unionIntegralSummarizeInsert(@RequestBody UnionIntegralSummarizeDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionIntegralSummarizeInsert(item); |
| | | } |
| | | |
| | |
| | | @PostMapping("/update") |
| | | public R unionIntegralSummarizeUpdate(@RequestBody UnionIntegralSummarizeDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionIntegralSummarizeUpdate(item); |
| | | } |
| | | |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionOutdoorLaborDynamicDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComMngStructAreaDistrictVO; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/unionOutdoorLaborDynamic") |
| | | public class UnionOutdoorLaborDynamicApi { |
| | | public class UnionOutdoorLaborDynamicApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityUnionService communityUnionService; |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionOutdoorSiteDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityUnionService; |
| | |
| | | @Api(tags = {"总工会户外劳工站"}) |
| | | @RestController |
| | | @RequestMapping("/unionOutdoorSite") |
| | | public class UnionOutdoorSiteApi { |
| | | public class UnionOutdoorSiteApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityUnionService communityUnionService; |
| | |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionReportDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityUnionService; |
| | |
| | | @Api(tags = {"户外劳工站"}) |
| | | @RestController |
| | | @RequestMapping("/unionReport") |
| | | public class UnionReportApi { |
| | | public class UnionReportApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityUnionService communityUnionService; |
New file |
| | |
| | | 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.vos.R; |
| | | import com.panzhihua.common.service.community.CommunityUnionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Api(tags = {"收货地址"}) |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/UnionShippingAddress") |
| | | public class UnionShippingAddressApi extends BaseController |
| | | { |
| | | @Resource |
| | | private CommunityUnionService unionStoreService; |
| | | |
| | | @ApiOperation(value = "收货地址列表") |
| | | @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) |
| | | { |
| | | return unionStoreService.unionShippingAddressGetList(pageNum,pageSize,communityId,userId); |
| | | } |
| | | |
| | | @ApiOperation(value = "收货地址单个详情") |
| | | @GetMapping("/getData") |
| | | public R unionShippingAddressGetData(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.unionShippingAddressGetData(id); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "新增收货地址") |
| | | @PostMapping("/insert") |
| | | public R unionShippingAddressInsert(@RequestBody UnionShippingAddressDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionShippingAddressInsert(item); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改收货地址") |
| | | @PostMapping("/update") |
| | | public R unionShippingAddressUpdate(@RequestBody UnionShippingAddressDto item) |
| | | { |
| | | item.setUserId(getUserId()+""); |
| | | return unionStoreService.unionShippingAddressUpdate(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除接口 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "删除收货地址") |
| | | @DeleteMapping("/delete") |
| | | public R unionShippingAddressDelete(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.unionShippingAddressDelete(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 总工会户外劳动商品列表 |
| | | * |
| | | * @return 总工会户外劳动商品列表 |
| | | */ |
| | | @ApiOperation(value = "总工会户外劳动商品详情") |
| | | @GetMapping("/getData") |
| | | public R getData(String id) |
| | | { |
| | | return comEquipmentUnionStoreLDD.getData(id); |
| | | } |
| | | |
| | | /** |
| | | * 总工会户外劳动商品新增 |
| | | * |
| | | * @return 总工会户外劳动商品新增 |
| | |
| | | @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); |
| | | } |
| | | |
| | |
| | | package com.chuangongzhijia.huachengunion_applets.api; |
| | | package com.chuangongzhijia.huacheng_union_applets.api; |
| | | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionUserDto; |
| | | import com.panzhihua.common.model.vos.R; |
New file |
| | |
| | | package com.panzhihua.service_equipment.api; |
| | | |
| | | 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.service.UnionExchangeRecordService; |
| | | import com.panzhihua.service_equipment.service.UnionIntegralRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/UnionExchangeRecord") |
| | | public class UnionExchangeRecordApi |
| | | { |
| | | @Resource |
| | | private UnionExchangeRecordService unionStoreService; |
| | | |
| | | @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) |
| | | { |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,userId); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getData") |
| | | public R unionExchangeRecordGetData(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.getData(id); |
| | | } |
| | | |
| | | @PostMapping("/insert") |
| | | public R unionExchangeRecordInsert(@RequestBody UnionExchangeRecordDto item) |
| | | { |
| | | return unionStoreService.insert(item); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | public R unionExchangeRecordUpdate(@RequestBody UnionExchangeRecordDto item) |
| | | { |
| | | return unionStoreService.update(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除接口 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | public R unionExchangeRecordDelete(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.delete(id); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | 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.vos.R; |
| | | import com.panzhihua.service_equipment.service.UnionExchangeRecordService; |
| | | import com.panzhihua.service_equipment.service.UnionShippingAddressService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/UnionShippingAddress") |
| | | public class UnionShippingAddressApi |
| | | { |
| | | @Resource |
| | | private UnionShippingAddressService unionStoreService; |
| | | |
| | | @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) |
| | | { |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,userId); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getData") |
| | | public R unionShippingAddressGetData(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.getData(id); |
| | | } |
| | | |
| | | @PostMapping("/insert") |
| | | public R unionShippingAddressInsert(@RequestBody UnionShippingAddressDto item) |
| | | { |
| | | return unionStoreService.insert(item); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | | public R unionShippingAddressUpdate(@RequestBody UnionShippingAddressDto item) |
| | | { |
| | | return unionStoreService.update(item); |
| | | } |
| | | |
| | | /** |
| | | * 删除接口 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | public R unionShippingAddressDelete(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.delete(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,goodsType,nameOrNum); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getData") |
| | | public R getData(@RequestParam("id") String id) |
| | | { |
| | | return unionStoreService.getData(id); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/insert") |
| | | public R insert(@RequestBody UnionStoreDto item) |
| | | { |
New file |
| | |
| | | package com.panzhihua.service_equipment.dao; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionExchangeRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionShippingAddressDto; |
| | | import com.panzhihua.service_equipment.model.dos.UnionExchangeRecord; |
| | | import com.panzhihua.service_equipment.model.dos.UnionShippingAddress; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * 户外劳工商品表管理 |
| | | */ |
| | | @Mapper |
| | | public interface UnionShippingAddressMapper extends BaseMapper<UnionShippingAddress> |
| | | { |
| | | |
| | | IPage<UnionShippingAddress> getList(Page page, |
| | | @Param("communityId") String communityId, |
| | | @Param("userId") String userId); |
| | | |
| | | |
| | | UnionExchangeRecord getData(@Param("id") String id); |
| | | |
| | | int insert(@Param("item") UnionShippingAddressDto item); |
| | | |
| | | |
| | | int update(@Param("item") UnionShippingAddressDto item); |
| | | |
| | | /** |
| | | * 删除接口 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int delete(@Param("id") String id); |
| | | |
| | | |
| | | } |
| | |
| | | @Param("goodsType") String goodsType, |
| | | @Param("nameOrNum") String nameOrNum); |
| | | |
| | | UnionStore getData(@Param("id") String id); |
| | | |
| | | |
| | | int insert(@Param("item") UnionStoreDto item); |
| | | |
| | | |
New file |
| | |
| | | package com.panzhihua.service_equipment.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | @TableName("union_shipping_address") |
| | | @Data |
| | | @ApiModel("收货地址") |
| | | public class UnionShippingAddress implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主键id") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(value = "用户id") |
| | | private String userId; |
| | | |
| | | /** |
| | | * 社区id |
| | | */ |
| | | @ApiModelProperty(value = "社区id") |
| | | private String communityId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "收货地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lng; |
| | | |
| | | @ApiModelProperty(value = "收货人手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "收货人姓名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "是否默认(0 不是 1是)") |
| | | private String isDefault; |
| | | |
| | | @ApiModelProperty(value = "性别(0 女士 1先生)") |
| | | private String gender; |
| | | |
| | | @ApiModelProperty(value = "楼号门牌") |
| | | private String houseNum; |
| | | |
| | | @ApiModelProperty(value = "收货城市") |
| | | private String city; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_equipment.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionExchangeRecordDto; |
| | | import com.panzhihua.common.model.dtos.equipment.UnionIntegralRecordDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface UnionExchangeRecordService |
| | | { |
| | | R getList(int pageNum,int pageSize, String communityId,String userId); |
| | | |
| | | R getData(String id); |
| | | |
| | | R insert(UnionExchangeRecordDto item); |
| | | |
| | | |
| | | R update(UnionExchangeRecordDto item); |
| | | |
| | | /** |
| | | * 删除接口 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R delete(String id); |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_equipment.service; |
| | | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionShippingAddressDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | |
| | | public interface UnionShippingAddressService |
| | | { |
| | | R getList(int pageNum,int pageSize, String communityId,String userId); |
| | | |
| | | R getData(String id); |
| | | |
| | | R insert(UnionShippingAddressDto item); |
| | | |
| | | |
| | | R update(UnionShippingAddressDto item); |
| | | |
| | | /** |
| | | * 删除接口 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | R delete(String id); |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionStoreDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.model.dos.UnionStore; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | public interface UnionStoreService |
| | | { |
| | | R getList(int pageNum,int pageSize, String communityId, String goodsType, String nameOrNum); |
| | | |
| | | |
| | | R getData(String id); |
| | | |
| | | R insert(UnionStoreDto item); |
| | | |
| | | |
New file |
| | |
| | | package com.panzhihua.service_equipment.service.impl; |
| | | |
| | | 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.vos.R; |
| | | import com.panzhihua.service_equipment.dao.UnionExchangeRecordMapper; |
| | | import com.panzhihua.service_equipment.model.dos.UnionExchangeRecord; |
| | | import com.panzhihua.service_equipment.service.UnionExchangeRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class UnionExchangeRecordServiceImpl extends ServiceImpl<UnionExchangeRecordMapper, UnionExchangeRecord> |
| | | implements UnionExchangeRecordService |
| | | { |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize, String communityId, String userId) |
| | | { |
| | | Page page=new Page(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,communityId,userId)); |
| | | } |
| | | |
| | | @Override |
| | | public R getData(String id) { |
| | | return R.ok(baseMapper.getData(id)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(UnionExchangeRecordDto item) |
| | | { |
| | | int num= baseMapper.insert(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R update(UnionExchangeRecordDto item) |
| | | { |
| | | int num= baseMapper.update(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R delete(String id) |
| | | { |
| | | int num= baseMapper.delete(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.panzhihua.service_equipment.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | 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.service_equipment.dao.UnionShippingAddressMapper; |
| | | import com.panzhihua.service_equipment.model.dos.UnionShippingAddress; |
| | | import com.panzhihua.service_equipment.service.UnionShippingAddressService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class UnionShippingAddressServiceImpl extends ServiceImpl<UnionShippingAddressMapper, UnionShippingAddress> |
| | | implements UnionShippingAddressService |
| | | { |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize, String communityId, String userId) |
| | | { |
| | | Page page=new Page(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,communityId,userId)); |
| | | } |
| | | |
| | | @Override |
| | | public R getData(String id) { |
| | | return R.ok(baseMapper.getData(id)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(UnionShippingAddressDto item) |
| | | { |
| | | int num= baseMapper.insert(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R update(UnionShippingAddressDto item) |
| | | { |
| | | int num= baseMapper.update(item); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | |
| | | @Override |
| | | public R delete(String id) |
| | | { |
| | | int num= baseMapper.delete(id); |
| | | if(num>0) |
| | | { |
| | | return R.ok(); |
| | | } |
| | | return R.fail("操作失败"); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R getData(String id) { |
| | | return R.ok(baseMapper.getData(id)); |
| | | } |
| | | |
| | | @Override |
| | | public R insert(UnionStoreDto item) |
| | | { |
| | | int num= baseMapper.insert(item); |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_equipment.dao.UnionShippingAddressMapper"> |
| | | <resultMap type="com.panzhihua.service_equipment.model.dos.UnionShippingAddress" id="ItemMap"> |
| | | <result property="id" column="id"/> |
| | | <result property="communityId" column="community_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="address" column="address"/> |
| | | <result property="lat" column="lat"/> |
| | | <result property="lng" column="lng"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="name" column="name"/> |
| | | <result property="isDefault" column="is_default"/> |
| | | <result property="gender" column="gender"/> |
| | | <result property="houseNum" column="house_num"/> |
| | | <result property="city" column="city"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="base_sql"> |
| | | id, |
| | | address, |
| | | lat, |
| | | lng, |
| | | user_id, |
| | | phone, |
| | | `name`, |
| | | community_id, |
| | | create_time, |
| | | update_time, |
| | | is_default, |
| | | gender, |
| | | house_num, |
| | | city |
| | | </sql> |
| | | |
| | | |
| | | <select id="getData" resultMap="ItemMap"> |
| | | select <include refid="base_sql"/> |
| | | from union_shipping_address |
| | | where id=#{id} |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="getList" resultMap="ItemMap"> |
| | | select <include refid="base_sql"/> |
| | | from union_shipping_address |
| | | <where> |
| | | 1=1 |
| | | <if test="communityId!=null and communityId!='' "> |
| | | and community_id=#{communityId} |
| | | </if> |
| | | <if test="userId!=null and userId!='' "> |
| | | and user_id=#{userId} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <insert id="insert"> |
| | | insert into union_shipping_address |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | id, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | user_id, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | community_id, |
| | | </if> |
| | | <if test="item.lat != null"> |
| | | lat, |
| | | </if> |
| | | <if test="item.lng != null"> |
| | | lng, |
| | | </if> |
| | | <if test="item.address != null"> |
| | | address, |
| | | </if> |
| | | <if test="item.phone != null"> |
| | | phone, |
| | | </if> |
| | | <if test="item.name != null"> |
| | | `name`, |
| | | </if> |
| | | <if test="item.isDefault != null"> |
| | | is_default, |
| | | </if> |
| | | <if test="item.gender != null"> |
| | | gender, |
| | | </if> |
| | | <if test="item.houseNum != null"> |
| | | house_num, |
| | | </if> |
| | | <if test="item.city != null"> |
| | | city, |
| | | </if> |
| | | create_time |
| | | </trim> |
| | | values |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | #{item.id}, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | #{item.communityId}, |
| | | </if> |
| | | <if test="item.lat != null"> |
| | | #{item.lat}, |
| | | </if> |
| | | <if test="item.lng != null"> |
| | | #{item.lng}, |
| | | </if> |
| | | <if test="item.address != null"> |
| | | #{item.address}, |
| | | </if> |
| | | <if test="item.phone != null"> |
| | | #{item.phone}, |
| | | </if> |
| | | <if test="item.name != null"> |
| | | #{item.name}, |
| | | </if> |
| | | <if test="item.isDefault != null"> |
| | | #{item.isDefault}, |
| | | </if> |
| | | <if test="item.gender != null"> |
| | | #{item.gender}, |
| | | </if> |
| | | <if test="item.houseNum != null"> |
| | | #{item.houseNum}, |
| | | </if> |
| | | <if test="item.city != null"> |
| | | #{item.city}, |
| | | </if> |
| | | |
| | | sysdate() |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="update"> |
| | | update union_shipping_address |
| | | <set> |
| | | <if test="item.id != null"> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.communityId != null"> |
| | | community_id=#{item.communityId}, |
| | | </if> |
| | | <if test="item.lat != null"> |
| | | lat=#{item.lat}, |
| | | </if> |
| | | <if test="item.lng != null"> |
| | | lng=#{item.lng}, |
| | | </if> |
| | | <if test="item.address != null"> |
| | | address=#{item.address}, |
| | | </if> |
| | | <if test="item.phone != null"> |
| | | phone=#{item.phone}, |
| | | </if> |
| | | <if test="item.name != null"> |
| | | `name`=#{item.name}, |
| | | </if> |
| | | <if test="item.isDefault != null"> |
| | | is_default=#{item.isDefault}, |
| | | </if> |
| | | <if test="item.gender != null"> |
| | | gender=#{item.gender}, |
| | | </if> |
| | | <if test="item.houseNum != null"> |
| | | house_num=#{item.houseNum}, |
| | | </if> |
| | | <if test="item.city != null"> |
| | | city=#{item.city}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | | </update> |
| | | |
| | | <delete id="delete" parameterType="String"> |
| | | delete from union_shipping_address where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getData" resultMap="UnionStoreMap"> |
| | | select <include refid="base_sql"/> |
| | | from union_store |
| | | where id=#{id} |
| | | </select> |
| | | |
| | | |
| | | <insert id="insert"> |
| | | insert into union_store |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |