| | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("用户积分总表") |
| | | public class UnionExchangeRecordDto implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | @ApiModel("兑换记录表") |
| | | public class UnionExchangeRecordDto{ |
| | | |
| | | /** |
| | | * 主键id |
| | |
| | | @ApiModelProperty(value = "商品id") |
| | | private String goodsId; |
| | | |
| | | @ApiModelProperty(value = "订单状态(1待发货 2待收货/待自提 3已完成 4 已取消 )") |
| | | @ApiModelProperty(value = "订单状态(1待发货 2待收货 3待自提 4已完成 5已取消 )") |
| | | private String orderType; |
| | | |
| | | @ApiModelProperty(value = "消费积分") |
| | |
| | | @ApiModelProperty(value = "取货方式(1邮寄 2自提)") |
| | | private String pickUpMethod; |
| | | |
| | | |
| | | @ApiModelProperty(value = "自提地址") |
| | | private String pickUpAddress; |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty(value = "自提时间") |
| | | private String openingHours; |
| | | |
| | | @ApiModelProperty(value = "封面") |
| | | private String goodsCoverUrl; |
| | | |
| | | @ApiModelProperty(value = "地区名字") |
| | | private String communityName; |
| | | |
| | | } |
| | | |
| | |
| | | @GetMapping("/UnionExchangeRecord/getList") |
| | | public R unionExchangeRecordGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId); |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "orderType",required = false) String orderType); |
| | | |
| | | |
| | | @GetMapping("/UnionExchangeRecord/getData") |
| | |
| | | @GetMapping("/getList") |
| | | public R unionExchangeRecordGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId) |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "orderType",required = false) String orderType) |
| | | { |
| | | return unionStoreService.unionExchangeRecordGetList(pageNum,pageSize,communityId); |
| | | return unionStoreService.unionExchangeRecordGetList(pageNum,pageSize,communityId,orderType); |
| | | } |
| | | |
| | | @ApiOperation(value = "兑换记录单个详情",response = UnionExchangeRecordDto.class) |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "添加物流公司") |
| | | @ApiOperation(value = "已收货") |
| | | @PostMapping("/confirmOrder") |
| | | public R unionExchangeRecordConfirmOrder(@RequestBody UnionExchangeRecordDto item) |
| | | { |
| | |
| | | { |
| | | return R.fail("订单id不能为空"); |
| | | } |
| | | item.setOrderType("3"); |
| | | item.setOrderType("4"); |
| | | return unionStoreService.unionExchangeRecordUpdate(item); |
| | | } |
| | | |
| | |
| | | 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.common.utlis.StringUtils; |
| | | import com.panzhihua.service_equipment.annotation.CurrentUser; |
| | | import com.panzhihua.service_equipment.service.UnionExchangeRecordService; |
| | | import com.panzhihua.service_equipment.service.UnionIntegralRecordService; |
| | |
| | | public R unionExchangeRecordGetList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "orderType",required = false) String orderType, |
| | | @CurrentUser UnionUserDto unionUser) |
| | | { |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,unionUser.getId()+""); |
| | | if(StringUtils.equals("0",orderType)) |
| | | { |
| | | orderType=null; |
| | | } |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,unionUser.getId()+"",orderType); |
| | | } |
| | | |
| | | |
| | |
| | | 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.common.utlis.StringUtils; |
| | | import com.panzhihua.service_equipment.annotation.CurrentUser; |
| | | import com.panzhihua.service_equipment.model.dos.UnionIntegralSummarize; |
| | | import com.panzhihua.service_equipment.service.UnionIntegralSummarizeService; |
| | | import com.panzhihua.service_equipment.service.UnionStoreService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Resource |
| | | private UnionStoreService unionStoreService; |
| | | |
| | | @Resource |
| | | private UnionIntegralSummarizeService unionIntegralSummarizeService; |
| | | |
| | | @GetMapping("/getList") |
| | | public R getList(@RequestParam("pageNum") int pageNum, |
| | | @RequestParam("pageSize") int pageSize, |
| | | @RequestParam(value = "communityId",required = false) String communityId, |
| | | @RequestParam(value = "goodsType",required = false) String goodsType, |
| | | @RequestParam(value = "nameOrNum",required = false) String nameOrNum) |
| | | @RequestParam(value = "nameOrNum",required = false) String nameOrNum, |
| | | @CurrentUser UnionUserDto unionUser) |
| | | { |
| | | if(StringUtils.isEmpty(communityId)) |
| | | { |
| | | R<UnionIntegralSummarize> unionIntegralSummarizeR= |
| | | unionIntegralSummarizeService.getUserData(unionUser.getId()+"",null); |
| | | communityId=unionIntegralSummarizeR.getData().getCommunityId(); |
| | | } |
| | | return unionStoreService.getList(pageNum,pageSize,communityId,goodsType,nameOrNum); |
| | | } |
| | | |
| | |
| | | import com.panzhihua.service_equipment.model.dos.UnionUser; |
| | | import com.panzhihua.service_equipment.service.UnionUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | IPage<UnionExchangeRecord> getList(Page page, |
| | | @Param("communityId") String communityId, |
| | | @Param("userId") String userId); |
| | | @Param("userId") String userId, |
| | | @Param("orderType") String orderType); |
| | | |
| | | |
| | | UnionExchangeRecord getData(@Param("id") String id); |
| | |
| | | package com.panzhihua.service_equipment.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | @ApiModelProperty(value = "商品id") |
| | | private String goodsId; |
| | | |
| | | @ApiModelProperty(value = "订单状态(1待发货 2待收货/待自提 3已完成 4 已取消)") |
| | | @ApiModelProperty(value = "订单状态(1待发货 2待收货 3待自提 4已完成 5已取消)") |
| | | private String orderType; |
| | | |
| | | @ApiModelProperty(value = "消费积分") |
| | |
| | | @ApiModelProperty(value = "取货方式(1邮寄 2自提)") |
| | | private String pickUpMethod; |
| | | |
| | | @ApiModelProperty(value = "自提地址") |
| | | private String pickUpAddress; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodName; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商品封面图片") |
| | | private String goodsCoverUrl; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商品图片") |
| | | private String goodsUrl; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_equipment.model.dos; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty(value = "自提时间") |
| | | private String openingHours; |
| | | |
| | | @ApiModelProperty(value = "封面") |
| | | private String goodsCoverUrl; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "地区名字") |
| | | private String communityName; |
| | | } |
| | |
| | | |
| | | public interface UnionExchangeRecordService |
| | | { |
| | | R<IPage<UnionExchangeRecord>> getList(int pageNum, int pageSize, String communityId, String userId); |
| | | R<IPage<UnionExchangeRecord>> getList(int pageNum, int pageSize, String communityId, String userId,String orderType); |
| | | |
| | | R<UnionExchangeRecord> getData(String id); |
| | | |
| | |
| | | private UnionIntegralRecordService unionIntegralRecordService; |
| | | |
| | | @Override |
| | | public R getList(int pageNum,int pageSize, String communityId, String userId) |
| | | public R getList(int pageNum,int pageSize, String communityId, String userId,String orderType) |
| | | { |
| | | Page page=new Page(pageNum,pageSize); |
| | | return R.ok(baseMapper.getList(page,communityId,userId)); |
| | | return R.ok(baseMapper.getList(page,communityId,userId,orderType)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | |
| | | item.setOrderNum(Snowflake.getId()+""); |
| | | item.setOrderType("1"); |
| | | //判断是否是邮寄 |
| | | if(StringUtils.equals("1",item.getPickUpMethod())) |
| | | { |
| | | item.setOrderType("1"); |
| | | } |
| | | else |
| | | { |
| | | item.setOrderType("3"); |
| | | } |
| | | item.setPlayIntegral(allPrice+""); |
| | | |
| | | int num= baseMapper.insert(item); |
| | |
| | | @Override |
| | | public R insert(UnionShippingAddressDto item) |
| | | { |
| | | if(StringUtils.equals("true",item.getIsDefault())) |
| | | if(StringUtils.equals("true",item.getIsDefault()+"")) |
| | | { |
| | | UnionShippingAddress unionShippingAddress=baseMapper.getDefaultData(item.getUserId()); |
| | | if(unionShippingAddress!=null) |
| | |
| | | @Override |
| | | public R update(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.update(item); |
| | | if(num>0) |
| | | { |
| | |
| | | import com.panzhihua.common.model.dtos.equipment.UnionStoreDto; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.service_equipment.dao.UnionStoreMapper; |
| | | import com.panzhihua.service_equipment.model.dos.UnionIntegralSummarize; |
| | | import com.panzhihua.service_equipment.model.dos.UnionStore; |
| | | 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 |
| | | @Slf4j |
| | |
| | | <result property="logisticsNum" column="logistics_num"/> |
| | | <result property="playIntegral" column="play_integral"/> |
| | | <result property="pickUpMethod" column="pick_up_method"/> |
| | | <result property="pickUpAddress" column="pick_up_address"/> |
| | | </resultMap> |
| | | |
| | | <sql id="base_sql"> |
| | |
| | | (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, |
| | | (select su.good_name from union_store as su where su.id=union_exchange_record.goods_id) as goodName, |
| | | (select su.goods_cover_url from union_store as su where su.id=union_exchange_record.goods_id) as goodsCoverUrl, |
| | | (select su.goods_url from union_store as su where su.id=union_exchange_record.goods_id) as goodsUrl, |
| | | order_type, |
| | | consumption_points, |
| | | consignee, |
| | |
| | | logistics_company, |
| | | logistics_num, |
| | | play_integral, |
| | | community_id |
| | | community_id, |
| | | pick_up_address, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | |
| | | <if test="userId!=null and userId!='' "> |
| | | and user_id=#{userId} |
| | | </if> |
| | | <if test="orderType!=null and orderType!='' "> |
| | | and order_type=#{orderType} |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | |
| | | <insert id="insert"> |
| | | insert into union_exchange_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.communityId != null"> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | community_id, |
| | | </if> |
| | | <if test="item.orderNum != null"> |
| | | <if test="item.orderNum != null and item.orderNum != '' "> |
| | | order_num, |
| | | </if> |
| | | <if test="item.goodsId != null"> |
| | | <if test="item.goodsId != null and item.goodsId != '' "> |
| | | goods_id, |
| | | </if> |
| | | <if test="item.orderType != null"> |
| | | <if test="item.orderType != null and item.orderType != '' "> |
| | | order_type, |
| | | </if> |
| | | <if test="item.consumptionPoints != null"> |
| | | <if test="item.consumptionPoints != null and item.consumptionPoints != '' "> |
| | | consumption_points, |
| | | </if> |
| | | <if test="item.consignee != null"> |
| | | <if test="item.consignee != null and item.consignee != '' "> |
| | | consignee, |
| | | </if> |
| | | <if test="item.consigneePhone != null"> |
| | | <if test="item.consigneePhone != null and item.consigneePhone != '' "> |
| | | consignee_phone, |
| | | </if> |
| | | <if test="item.consigneeAddress != null"> |
| | | <if test="item.consigneeAddress != null and item.consigneeAddress != '' "> |
| | | consignee_address, |
| | | </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.goodsNum != null"> |
| | | <if test="item.goodsNum != null and item.goodsNum != '' "> |
| | | goods_num, |
| | | </if> |
| | | <if test="item.logisticsCompany != null"> |
| | | <if test="item.logisticsCompany != null and item.logisticsCompany != '' "> |
| | | logistics_company, |
| | | </if> |
| | | <if test="item.logisticsNum != null"> |
| | | <if test="item.logisticsNum != null and item.logisticsNum != '' "> |
| | | logistics_num, |
| | | </if> |
| | | <if test="item.playIntegral != null"> |
| | | <if test="item.playIntegral != null and item.playIntegral != '' "> |
| | | play_integral, |
| | | </if> |
| | | <if test="item.pickUpMethod != null"> |
| | | <if test="item.pickUpMethod != null and item.pickUpMethod != '' "> |
| | | pick_up_method, |
| | | </if> |
| | | <if test="item.pickUpAddress != null and item.pickUpAddress != '' "> |
| | | pick_up_address, |
| | | </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.communityId != null"> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | #{item.communityId}, |
| | | </if> |
| | | <if test="item.orderNum != null"> |
| | | <if test="item.orderNum != null and item.orderNum != '' "> |
| | | #{item.orderNum}, |
| | | </if> |
| | | <if test="item.goodsId != null"> |
| | | <if test="item.goodsId != null and item.goodsId != '' "> |
| | | #{item.goodsId}, |
| | | </if> |
| | | <if test="item.orderType != null"> |
| | | <if test="item.orderType != null and item.orderType != '' "> |
| | | #{item.orderType}, |
| | | </if> |
| | | <if test="item.consumptionPoints != null"> |
| | | <if test="item.consumptionPoints != null and item.consumptionPoints != '' "> |
| | | #{item.consumptionPoints}, |
| | | </if> |
| | | <if test="item.consignee != null"> |
| | | <if test="item.consignee != null and item.consignee != '' "> |
| | | #{item.consignee}, |
| | | </if> |
| | | <if test="item.consigneePhone != null"> |
| | | <if test="item.consigneePhone != null and item.consigneePhone != '' "> |
| | | #{item.consigneePhone}, |
| | | </if> |
| | | <if test="item.consigneeAddress != null"> |
| | | <if test="item.consigneeAddress != null and item.consigneeAddress != '' "> |
| | | #{item.consigneeAddress}, |
| | | </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.goodsNum != null"> |
| | | <if test="item.goodsNum != null and item.goodsNum != '' "> |
| | | #{item.goodsNum}, |
| | | </if> |
| | | <if test="item.logisticsCompany != null"> |
| | | <if test="item.logisticsCompany != null and item.logisticsCompany != '' "> |
| | | #{item.logisticsCompany}, |
| | | </if> |
| | | <if test="item.logisticsNum != null"> |
| | | <if test="item.logisticsNum != null and item.logisticsNum != '' "> |
| | | #{item.logisticsNum}, |
| | | </if> |
| | | <if test="item.playIntegral != null"> |
| | | <if test="item.playIntegral != null and item.playIntegral != '' "> |
| | | #{item.playIntegral}, |
| | | </if> |
| | | <if test="item.pickUpMethod != null"> |
| | | <if test="item.pickUpMethod != null and item.pickUpMethod != '' "> |
| | | #{item.pickUpMethod}, |
| | | </if> |
| | | <if test="item.pickUpAddress != null and item.pickUpAddress != '' "> |
| | | #{item.pickUpAddress}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | |
| | | <update id="update"> |
| | | update union_exchange_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.communityId != null"> |
| | | <if test="item.communityId != null and item.communityId != '' "> |
| | | community_id=#{item.communityId}, |
| | | </if> |
| | | <if test="item.orderNum != null"> |
| | | <if test="item.orderNum != null and item.orderNum != '' "> |
| | | order_num=#{item.orderNum}, |
| | | </if> |
| | | <if test="item.goodsId != null"> |
| | | <if test="item.goodsId != null and item.goodsId != '' "> |
| | | goods_id=#{item.goodsId}, |
| | | </if> |
| | | <if test="item.orderType != null"> |
| | | <if test="item.orderType != null and item.orderType != '' "> |
| | | order_type=#{item.orderType}, |
| | | </if> |
| | | <if test="item.consumptionPoints != null"> |
| | | <if test="item.consumptionPoints != null and item.consumptionPoints != '' "> |
| | | consumption_points=#{item.consumptionPoints}, |
| | | </if> |
| | | <if test="item.consignee != null"> |
| | | <if test="item.consignee != null and item.consignee != '' "> |
| | | consignee=#{item.consignee}, |
| | | </if> |
| | | <if test="item.consigneePhone != null"> |
| | | <if test="item.consigneePhone != null and item.consigneePhone != '' "> |
| | | consignee_phone=#{item.consigneePhone}, |
| | | </if> |
| | | <if test="item.consigneeAddress != null"> |
| | | <if test="item.consigneeAddress != null and item.consigneeAddress != '' "> |
| | | consignee_address=#{item.consigneeAddress}, |
| | | </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.goodsNum != null"> |
| | | <if test="item.goodsNum != null and item.goodsNum != '' "> |
| | | goods_num=#{item.goodsNum}, |
| | | </if> |
| | | <if test="item.logisticsCompany != null"> |
| | | <if test="item.logisticsCompany != null and item.logisticsCompany != '' "> |
| | | logistics_company=#{item.logisticsCompany}, |
| | | </if> |
| | | <if test="item.logisticsNum != null"> |
| | | <if test="item.logisticsNum != null and item.logisticsNum != '' "> |
| | | logistics_num=#{item.logisticsNum}, |
| | | </if> |
| | | <if test="item.playIntegral != null"> |
| | | <if test="item.playIntegral != null and item.playIntegral != '' "> |
| | | play_integral=#{item.playIntegral}, |
| | | </if> |
| | | <if test="item.pickUpMethod != null"> |
| | | <if test="item.pickUpMethod != null and item.pickUpMethod != '' "> |
| | | pick_up_method=#{item.pickUpMethod}, |
| | | </if> |
| | | <if test="item.pickUpAddress != null and item.pickUpAddress != '' "> |
| | | pick_up_address=#{item.pickUpAddress}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |
| | |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.integralTyppe != null and item.integralTyppe != '' "> |
| | | #{item.integralTyppe}, |
| | | <if test="item.integralType != null and item.integralType != '' "> |
| | | #{item.integralType}, |
| | | </if> |
| | | <if test="item.integral != null and item.integral != '' "> |
| | | #{item.integral}, |
| | |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="openingHours" column="opening_hours"/> |
| | | <result property="goodsCoverUrl" column="goods_cover_url"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="base_sql"> |
| | |
| | | lng, |
| | | content, |
| | | community_id, |
| | | (select uos.name from union_outdoor_site as uos where community_id=uos.area_code) as communityName, |
| | | goods_type, |
| | | good_num, |
| | | user_id, |
| | | opening_hours, |
| | | goods_cover_url, |
| | | create_time, |
| | | update_time |
| | | </sql> |
| | |
| | | <insert id="insert"> |
| | | insert into union_store |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="item.id != null"> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id, |
| | | </if> |
| | | <if test="item.goodName != null"> |
| | | <if test="item.goodName != null and item.goodName != '' "> |
| | | good_name, |
| | | </if> |
| | | <if test="item.conversionPrice != null"> |
| | | <if test="item.conversionPrice != null and item.conversionPrice != '' "> |
| | | conversion_price, |
| | | </if> |
| | | <if test="item.stock != null"> |
| | | <if test="item.stock != null and item.stock != '' "> |
| | | stock, |
| | | </if> |
| | | <if test="item.pickGoods != null"> |
| | | <if test="item.pickGoods != null and item.pickGoods != '' "> |
| | | pick_goods, |
| | | </if> |
| | | <if test="item.goodsUrl != null"> |
| | | <if test="item.goodsUrl != null and item.goodsUrl != '' "> |
| | | goods_url, |
| | | </if> |
| | | <if test="item.pickGoodsAddress != null"> |
| | | <if test="item.pickGoodsAddress != null and item.pickGoodsAddress != '' "> |
| | | pick_goods_address, |
| | | </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.content != null"> |
| | | <if test="item.content != null and item.content != '' "> |
| | | content, |
| | | </if> |
| | | <if test="item.goodsType != null"> |
| | | <if test="item.goodsType != null and item.goodsType != '' "> |
| | | goods_type, |
| | | </if> |
| | | <if test="item.goodNum != null"> |
| | | <if test="item.goodNum != null and item.goodNum != '' "> |
| | | good_num, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id, |
| | | </if> |
| | | <if test="item.openingHours != null and item.openingHours != '' "> |
| | | opening_hours, |
| | | </if> |
| | | <if test="item.goodsCoverUrl != null and item.goodsCoverUrl != '' "> |
| | | goods_cover_url, |
| | | </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.goodName != null"> |
| | | <if test="item.goodName != null and item.goodName != '' "> |
| | | #{item.goodName}, |
| | | </if> |
| | | <if test="item.conversionPrice != null"> |
| | | <if test="item.conversionPrice != null and item.conversionPrice != '' "> |
| | | #{item.conversionPrice}, |
| | | </if> |
| | | <if test="item.stock != null"> |
| | | <if test="item.stock != null and item.stock != '' "> |
| | | #{item.stock}, |
| | | </if> |
| | | <if test="item.pickGoods != null"> |
| | | <if test="item.pickGoods != null and item.pickGoods != '' "> |
| | | #{item.pickGoods}, |
| | | </if> |
| | | <if test="item.goodsUrl != null"> |
| | | <if test="item.goodsUrl != null and item.goodsUrl != '' "> |
| | | #{item.goodsUrl}, |
| | | </if> |
| | | <if test="item.pickGoodsAddress != null"> |
| | | <if test="item.pickGoodsAddress != null and item.pickGoodsAddress != '' "> |
| | | #{item.pickGoodsAddress}, |
| | | </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.content != null"> |
| | | <if test="item.content != null and item.content != '' "> |
| | | #{item.content}, |
| | | </if> |
| | | <if test="item.goodsType != null"> |
| | | <if test="item.goodsType != null and item.goodsType != '' "> |
| | | #{item.goodsType}, |
| | | </if> |
| | | <if test="item.goodNum != null"> |
| | | <if test="item.goodNum != null and item.goodNum != '' "> |
| | | #{item.goodNum}, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | #{item.userId}, |
| | | </if> |
| | | <if test="item.openingHours != null and item.openingHours != '' "> |
| | | #{item.openingHours}, |
| | | </if> |
| | | <if test="item.goodsCoverUrl != null and item.goodsCoverUrl != '' "> |
| | | #{item.goodsCoverUrl}, |
| | | </if> |
| | | sysdate() |
| | | </trim> |
| | |
| | | <update id="update"> |
| | | update union_store |
| | | <set> |
| | | <if test="item.id != null"> |
| | | <if test="item.id != null and item.id != '' "> |
| | | id=#{item.id}, |
| | | </if> |
| | | <if test="item.goodName != null"> |
| | | <if test="item.goodName != null and item.goodName != '' "> |
| | | good_name=#{item.goodName}, |
| | | </if> |
| | | <if test="item.conversionPrice != null"> |
| | | <if test="item.conversionPrice != null and item.conversionPrice != '' "> |
| | | conversion_price=#{item.conversionPrice}, |
| | | </if> |
| | | <if test="item.stock != null"> |
| | | <if test="item.stock != null and item.stock != '' "> |
| | | stock=#{item.stock}, |
| | | </if> |
| | | <if test="item.pickGoods != null"> |
| | | <if test="item.pickGoods != null and item.pickGoods != '' "> |
| | | pick_goods=#{item.pickGoods}, |
| | | </if> |
| | | <if test="item.goodsUrl != null"> |
| | | <if test="item.goodsUrl != null and item.goodsUrl != '' "> |
| | | goods_url=#{item.goodsUrl}, |
| | | </if> |
| | | <if test="item.pickGoodsAddress != null"> |
| | | <if test="item.pickGoodsAddress != null and item.pickGoodsAddress != '' "> |
| | | pick_goods_address=#{item.pickGoodsAddress}, |
| | | </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.content != null"> |
| | | <if test="item.content != null and item.content != '' "> |
| | | content=#{item.content}, |
| | | </if> |
| | | <if test="item.goodsType != null"> |
| | | <if test="item.goodsType != null and item.goodsType != '' "> |
| | | goods_type=#{item.goodsType}, |
| | | </if> |
| | | <if test="item.goodNum != null"> |
| | | <if test="item.goodNum != null and item.goodNum != '' "> |
| | | good_num=#{item.goodNum}, |
| | | </if> |
| | | <if test="item.userId != null"> |
| | | <if test="item.userId != null and item.userId != '' "> |
| | | user_id=#{item.userId}, |
| | | </if> |
| | | <if test="item.openingHours != null and item.openingHours != '' "> |
| | | opening_hours=#{item.openingHours}, |
| | | </if> |
| | | <if test="item.goodsCoverUrl != null and item.goodsCoverUrl != '' "> |
| | | goods_cover_url=#{item.goodsCoverUrl}, |
| | | </if> |
| | | update_time=sysdate() |
| | | </set> |
| | | where id = #{item.id} |