| @@ -8,6 +8,7 @@ import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import com.iformall.domain.po.WxCouponPassword; | import com.iformall.domain.po.WxCouponPassword; | ||||
| import com.iformall.domain.vo.WxCouponPasswordCountInfoVO; | import com.iformall.domain.vo.WxCouponPasswordCountInfoVO; | ||||
| import com.iformall.domain.vo.WxCouponPasswordVo; | |||||
| import com.iformall.service.WxCouponPasswordService; | import com.iformall.service.WxCouponPasswordService; | ||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| @@ -88,7 +89,7 @@ public class WxCouponPasswordController extends BaseController { | |||||
| wxCouponPassword.updateTenantInfo(getTenantInfo()); | wxCouponPassword.updateTenantInfo(getTenantInfo()); | ||||
| wxCouponPassword.setSortColumns(BaseEntity.SortField.CreateDate_DESC, BaseEntity.SortField.Id_DESC); | wxCouponPassword.setSortColumns(BaseEntity.SortField.CreateDate_DESC, BaseEntity.SortField.Id_DESC); | ||||
| final PageInfo<WxCouponPassword> page = wxCouponPasswordService.listAsPage(wxCouponPassword, pageNum, pageSize); | |||||
| final PageInfo<WxCouponPasswordVo> page = wxCouponPasswordService.listVoAsPage(wxCouponPassword, pageNum, pageSize); | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -1,12 +1,20 @@ | |||||
| alter table wx_card_info add column coupon_password varchar(50) comment '卡密'; | alter table wx_card_info add column coupon_password varchar(50) comment '卡密'; | ||||
| alter table wx_card_info add column c_user_id bigint(20) comment '购买用户编码'; | alter table wx_card_info add column c_user_id bigint(20) comment '购买用户编码'; | ||||
| alter table wx_card_info add column owner_user_id bigint(20) comment '持有用户编码'; | alter table wx_card_info add column owner_user_id bigint(20) comment '持有用户编码'; | ||||
| alter table wx_card_info add column status int(1) not null default 0 comment '状态'; | |||||
| ###待做####### | ###待做####### | ||||
| ##coupon_password_id,coupon_password,c_user_id,owner_user_id 刷数据,后两者不能为空 | ##coupon_password_id,coupon_password,c_user_id,owner_user_id 刷数据,后两者不能为空 | ||||
| # 转赠验证wx_coupon_order的c_user_id不变 | # 转赠验证wx_coupon_order的c_user_id不变 | ||||
| #select * from wx_card_info where (c_user_id is null or owner_user_id is null) | |||||
| #and tenant_id = 789 order by create_date desc | |||||
| #update wx_card_info ci left join wx_coupon_order_89 co on ci.id = co.id | |||||
| #set ci.c_user_id = co.c_user_id, ci.owner_user_id = co.owner_id | |||||
| alter table wx_card_info add column status int(1) not null default 0 comment '状态'; | |||||
| @@ -46,13 +46,16 @@ public class WxCouponPasswordVo extends TenantEntity { | |||||
| @Excel(name = "激活会员", width = 20, orderNum = "8", prefix = "`") | @Excel(name = "激活会员", width = 20, orderNum = "8", prefix = "`") | ||||
| @io.swagger.annotations.ApiModelProperty(value = "激活会员", name = "userName") | @io.swagger.annotations.ApiModelProperty(value = "激活会员", name = "userName") | ||||
| private String userName; | private String userName; | ||||
| @Excel(name = "面额(元)", width = 20, orderNum = "9", prefix = "`") | |||||
| @Excel(name = "电子卡卡号", width = 20, orderNum = "9", prefix = "`") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "电子卡卡号", name = "cardId") | |||||
| private Long cardId; | |||||
| @Excel(name = "面额(元)", width = 20, orderNum = "10", prefix = "`") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "面额(元)", name = "price") | @io.swagger.annotations.ApiModelProperty(value = "面额(元)", name = "price") | ||||
| private Double price; | private Double price; | ||||
| @Excel(name = "余额(元)", width = 20, orderNum = "10", prefix = "`") | |||||
| @Excel(name = "余额(元)", width = 20, orderNum = "11", prefix = "`") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "余额(元)", name = "remainPrice") | @io.swagger.annotations.ApiModelProperty(value = "余额(元)", name = "remainPrice") | ||||
| private Double remainPrice; | private Double remainPrice; | ||||
| @Excel(name = "激活卡状态", width = 20, orderNum = "11",replace = {"正常_0", "已禁用_1"}, prefix = "`") | |||||
| @Excel(name = "激活卡状态", width = 20, orderNum = "12",replace = {"正常_0", "已禁用_1"}, prefix = "`") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "激活卡状态EnumYesOrNo", name = "used") | @io.swagger.annotations.ApiModelProperty(value = "激活卡状态EnumYesOrNo", name = "used") | ||||
| private Integer cardStatus; | private Integer cardStatus; | ||||
| @@ -141,6 +141,7 @@ public class WxCouponPasswordServiceImpl implements WxCouponPasswordService { | |||||
| co.setUserName(basicInfo.getName()); | co.setUserName(basicInfo.getName()); | ||||
| } | } | ||||
| co.setCardStatus(cardInfo.getStatus()); | co.setCardStatus(cardInfo.getStatus()); | ||||
| co.setCardId(cardInfo.getId()); | |||||
| }else { | }else { | ||||
| co.setUsed(EnumYesOrNo.NO.getCode()); | co.setUsed(EnumYesOrNo.NO.getCode()); | ||||
| } | } | ||||