| @@ -75,7 +75,7 @@ public class WxCouponController extends BaseController { | |||||
| } | } | ||||
| if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | ||||
| String coryColumn = "c."+wxCoupon.getSortColumns(); | String coryColumn = "c."+wxCoupon.getSortColumns(); | ||||
| wxCoupon.setSortColumn(coryColumn); | |||||
| wxCoupon.setSortColumns(coryColumn); | |||||
| wxCoupon.setSortColumn(null); | wxCoupon.setSortColumn(null); | ||||
| } | } | ||||
| if(wxCoupon.getTargetAd() != null && wxCoupon.getTargetAd() == EnumCouponChannelType.COUPON_CHANNEL_ID_TIMED.getCode()){ | if(wxCoupon.getTargetAd() != null && wxCoupon.getTargetAd() == EnumCouponChannelType.COUPON_CHANNEL_ID_TIMED.getCode()){ | ||||
| @@ -114,7 +114,7 @@ public class WxCouponController extends BaseController { | |||||
| wxCoupon.setTypes(Arrays.asList(typeArray)); | wxCoupon.setTypes(Arrays.asList(typeArray)); | ||||
| if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | ||||
| String coryColumn = "c."+wxCoupon.getSortColumns(); | String coryColumn = "c."+wxCoupon.getSortColumns(); | ||||
| wxCoupon.setSortColumn(coryColumn); | |||||
| wxCoupon.setSortColumns(coryColumn); | |||||
| wxCoupon.setSortColumn(null); | wxCoupon.setSortColumn(null); | ||||
| } | } | ||||
| return wxCouponService.list(wxCoupon,wxCoupon, pageNum, pageSize); //全列表 | return wxCouponService.list(wxCoupon,wxCoupon, pageNum, pageSize); //全列表 | ||||
| @@ -58,7 +58,7 @@ public class MemCouponController extends BaseController { | |||||
| if(StringUtils.isNotBlank(wxCouponChannel.getSortColumn())){ | if(StringUtils.isNotBlank(wxCouponChannel.getSortColumn())){ | ||||
| // String coryColumn = "c."+wxCouponChannel.getSortColumns(); | // String coryColumn = "c."+wxCouponChannel.getSortColumns(); | ||||
| // wxCouponChannel.setSortColumn(coryColumn); | |||||
| // wxCouponChannel.setSortColumns(coryColumn); | |||||
| // wxCouponChannel.setSortColumn(null); | // wxCouponChannel.setSortColumn(null); | ||||
| }else{ | }else{ | ||||
| wxCouponChannel.setSortColumns(BaseEntity.SortField.CCUpdateDate_DESC); | wxCouponChannel.setSortColumns(BaseEntity.SortField.CCUpdateDate_DESC); | ||||
| @@ -2,4 +2,10 @@ ALTER TABLE `wx_merchant` | |||||
| ADD COLUMN `business_types` json AFTER `business_id`; | ADD COLUMN `business_types` json AFTER `business_id`; | ||||
| ALTER TABLE `wx_pay_account` | ALTER TABLE `wx_pay_account` | ||||
| ADD COLUMN `notify_token` varchar(255) COMMENT '回调token' AFTER `notify_url`; | |||||
| ADD COLUMN `notify_token` varchar(255) COMMENT '回调token' AFTER `notify_url`; | |||||
| ALTER TABLE `wx_merchant` | |||||
| ADD COLUMN `mark` smallint(1) COMMENT '记号' AFTER `action_desc`; | |||||
| ALTER TABLE `wx_merchant` | |||||
| ADD COLUMN `entry_amount` int(11) COMMENT '入账金额' AFTER `credit_locked`; | |||||
| @@ -72,7 +72,7 @@ public class WxCouponController extends BaseController { | |||||
| if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | ||||
| String coryColumn = "c."+wxCoupon.getSortColumns(); | String coryColumn = "c."+wxCoupon.getSortColumns(); | ||||
| wxCoupon.setSortColumn(coryColumn); | |||||
| wxCoupon.setSortColumns(coryColumn); | |||||
| wxCoupon.setSortColumn(null); | wxCoupon.setSortColumn(null); | ||||
| } | } | ||||
| @@ -102,7 +102,7 @@ public class WxCouponController extends BaseController { | |||||
| wxCoupon.setMerchantId(getLoginBUser().getMerchantId()); | wxCoupon.setMerchantId(getLoginBUser().getMerchantId()); | ||||
| if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | if(StringUtils.isNotBlank(wxCoupon.getSortColumn())){ | ||||
| String coryColumn = "c."+wxCoupon.getSortColumns(); | String coryColumn = "c."+wxCoupon.getSortColumns(); | ||||
| wxCoupon.setSortColumn(coryColumn); | |||||
| wxCoupon.setSortColumns(coryColumn); | |||||
| wxCoupon.setSortColumn(null); | wxCoupon.setSortColumn(null); | ||||
| } | } | ||||
| return wxCouponService.list(wxCoupon,wxCoupon, pageNum, pageSize); //全列表 | return wxCouponService.list(wxCoupon,wxCoupon, pageNum, pageSize); //全列表 | ||||
| @@ -245,6 +245,9 @@ public class WxMerchant extends TenantEntity { | |||||
| private String introduction; | private String introduction; | ||||
| @io.swagger.annotations.ApiModelProperty(value="优惠活动",name="actionDesc") | @io.swagger.annotations.ApiModelProperty(value="优惠活动",name="actionDesc") | ||||
| private String actionDesc; | private String actionDesc; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "记号1是0否", name = "mark") | |||||
| private Integer mark; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否删除1是0否", name = "isDel") | @io.swagger.annotations.ApiModelProperty(value = "是否删除1是0否", name = "isDel") | ||||
| private Integer isDel; | private Integer isDel; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "客服电话", name = "linkLinePhone") | @io.swagger.annotations.ApiModelProperty(value = "客服电话", name = "linkLinePhone") | ||||
| @@ -267,6 +270,9 @@ public class WxMerchant extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "积分锁定0正常1锁定", name = "creditLocked") | @io.swagger.annotations.ApiModelProperty(value = "积分锁定0正常1锁定", name = "creditLocked") | ||||
| private Integer creditLocked; | private Integer creditLocked; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "入账金额(分)", name = "entryAmount") | |||||
| private Integer entryAmount; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "商户待提现金额(分)", name = "cashOutNumber") | @io.swagger.annotations.ApiModelProperty(value = "商户待提现金额(分)", name = "cashOutNumber") | ||||
| private Integer cashOutNumber; | private Integer cashOutNumber; | ||||
| @@ -161,6 +161,9 @@ public class BaseEntity implements Serializable { | |||||
| UpdateDate_ASC("`update_date` ASC"), | UpdateDate_ASC("`update_date` ASC"), | ||||
| UpdateDate_DESC("`update_date` DESC"), | UpdateDate_DESC("`update_date` DESC"), | ||||
| CUpdateDate_ASC("c.`update_date` ASC"), | |||||
| CUpdateDate_DESC("c.`update_date` DESC"), | |||||
| CCUpdateDate_ASC("cc.`update_date` ASC"), | CCUpdateDate_ASC("cc.`update_date` ASC"), | ||||
| CCUpdateDate_DESC("cc.`update_date` DESC"), | CCUpdateDate_DESC("cc.`update_date` DESC"), | ||||
| @@ -108,6 +108,8 @@ public class TtCoupon extends TenantEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value="收藏数",name="collectCount") | @io.swagger.annotations.ApiModelProperty(value="收藏数",name="collectCount") | ||||
| private Integer collectCount; | private Integer collectCount; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "记号1是0否", name = "mark") | |||||
| private Integer mark; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否删除1是0否", name = "isDel") | @io.swagger.annotations.ApiModelProperty(value = "是否删除1是0否", name = "isDel") | ||||
| private Integer isDel; | private Integer isDel; | ||||
| @@ -38,13 +38,13 @@ public class TtOrderServiceImpl implements TtOrderService { | |||||
| private TtOrderMapper ttOrderMapper; | private TtOrderMapper ttOrderMapper; | ||||
| @Autowired | @Autowired | ||||
| private TtCouponMapper couponMapper; | |||||
| private TtCouponMapper ttcouponMapper; | |||||
| @Autowired | @Autowired | ||||
| private TtCUserMapper cUserMapper; | |||||
| private TtCUserMapper ttCUserMapper; | |||||
| @Autowired | @Autowired | ||||
| private WxMerchantMapper merchantMapper; | |||||
| private WxMerchantMapper wxMerchantMapper; | |||||
| // @Autowired | // @Autowired | ||||
| // private WxCUserBasicInfoService wxCUserBasicInfoService; | // private WxCUserBasicInfoService wxCUserBasicInfoService; | ||||
| @@ -94,7 +94,7 @@ public class TtOrderServiceImpl implements TtOrderService { | |||||
| // logger.info("会员权益被锁定:cUserId:" + cUserId); | // logger.info("会员权益被锁定:cUserId:" + cUserId); | ||||
| // return new ResultData(ErrorCode.MEMBER_IS_LOCKED); | // return new ResultData(ErrorCode.MEMBER_IS_LOCKED); | ||||
| // } | // } | ||||
| TtCoupon coupon = couponMapper.selectById(couponId); | |||||
| TtCoupon coupon = ttcouponMapper.selectById(couponId); | |||||
| if (null == coupon) { | if (null == coupon) { | ||||
| return new ResultData(ErrorCode.TTCOUPON_IS_EMPTY); | return new ResultData(ErrorCode.TTCOUPON_IS_EMPTY); | ||||
| } | } | ||||
| @@ -130,7 +130,7 @@ public class TtOrderServiceImpl implements TtOrderService { | |||||
| order.setCreateDate(now); | order.setCreateDate(now); | ||||
| order.setUpdateDate(now); | order.setUpdateDate(now); | ||||
| ttOrderMapper.insert(order); | ttOrderMapper.insert(order); | ||||
| couponMapper.addSellCount(coupon.getId()); | |||||
| ttcouponMapper.addSellCount(coupon.getId()); | |||||
| return new ResultData(order); | return new ResultData(order); | ||||
| } catch (MallinkException e) { | } catch (MallinkException e) { | ||||
| logger.error(e.getMessage()); | logger.error(e.getMessage()); | ||||
| @@ -185,9 +185,9 @@ public class TtOrderServiceImpl implements TtOrderService { | |||||
| if(memberId != null && !ttOrder.getCUserId().equals(memberId)){ | if(memberId != null && !ttOrder.getCUserId().equals(memberId)){ | ||||
| return null; | return null; | ||||
| } | } | ||||
| ttOrder.setCUser(cUserMapper.selectById(ttOrder.getCUserId())); | |||||
| ttOrder.setCoupon(couponMapper.selectById(ttOrder.getProductId())); | |||||
| ttOrder.setMerchant(merchantMapper.selectById(ttOrder.getMerchantId())); | |||||
| ttOrder.setCUser(ttCUserMapper.selectById(ttOrder.getCUserId())); | |||||
| ttOrder.setCoupon(ttcouponMapper.selectById(ttOrder.getProductId())); | |||||
| ttOrder.setMerchant(wxMerchantMapper.selectById(ttOrder.getMerchantId())); | |||||
| return ttOrder; | return ttOrder; | ||||
| } | } | ||||
| @@ -220,7 +220,7 @@ public class TtOrderServiceImpl implements TtOrderService { | |||||
| if(payAcount == null){ | if(payAcount == null){ | ||||
| return new ResultData(ErrorCode.APP_ID_NOT_FOUND); | return new ResultData(ErrorCode.APP_ID_NOT_FOUND); | ||||
| } | } | ||||
| TtCoupon coupon = couponMapper.selectById(order.getProductId()); | |||||
| TtCoupon coupon = ttcouponMapper.selectById(order.getProductId()); | |||||
| if (!coupon.getStatus().equals(EnumTtCouponStatus.TTCOUPON_STATUS_SHELFING.getCode())) { | if (!coupon.getStatus().equals(EnumTtCouponStatus.TTCOUPON_STATUS_SHELFING.getCode())) { | ||||
| logger.error("券已经下架了>>>" + order.getProductId()); | logger.error("券已经下架了>>>" + order.getProductId()); | ||||
| return new ResultData(ErrorCode.COUPON_CHANNEL_IS_TAKE_OFF); | return new ResultData(ErrorCode.COUPON_CHANNEL_IS_TAKE_OFF); | ||||
| @@ -34,6 +34,7 @@ | |||||
| <result column="sell_count" jdbcType="INTEGER" property="sellCount"/> | <result column="sell_count" jdbcType="INTEGER" property="sellCount"/> | ||||
| <result column="assess_count" jdbcType="INTEGER" property="assessCount"/> | <result column="assess_count" jdbcType="INTEGER" property="assessCount"/> | ||||
| <result column="collect_count" jdbcType="INTEGER" property="collectCount"/> | <result column="collect_count" jdbcType="INTEGER" property="collectCount"/> | ||||
| <result column="mark" jdbcType="INTEGER" property="mark"/> | |||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="column_id" jdbcType="BIGINT" property="columnId"/> | <result column="column_id" jdbcType="BIGINT" property="columnId"/> | ||||
| <result column="popularity" jdbcType="INTEGER" property="popularity"/> | <result column="popularity" jdbcType="INTEGER" property="popularity"/> | ||||
| @@ -51,7 +52,7 @@ | |||||
| c.`title`, c.`sub_title`, c.`video_id`, c.`video_time`,c.`video_url`, c.`html`, c.`is_landscape`, c.`is_payment`, | c.`title`, c.`sub_title`, c.`video_id`, c.`video_time`,c.`video_url`, c.`html`, c.`is_landscape`, c.`is_payment`, | ||||
| c.`sale_price`, c.`orig_price`, c.`is_preview`, c.`preview_duration`, c.`detail`, c.`false_sell_count`, | c.`sale_price`, c.`orig_price`, c.`is_preview`, c.`preview_duration`, c.`detail`, c.`false_sell_count`, | ||||
| c.`dy_title`, c.`inventory`, c.`remark`, c.`status`, c.`create_date`, c.`update_date`, | c.`dy_title`, c.`inventory`, c.`remark`, c.`status`, c.`create_date`, c.`update_date`, | ||||
| c.`see_count`, c.`sell_count`, c.`assess_count`, c.`collect_count`, c.`is_del`, | |||||
| c.`see_count`, c.`sell_count`, c.`assess_count`, c.`collect_count`, c.`mark`, c.`is_del`, | |||||
| c.`column_id`, c.`popularity`, c.`merchant_id`, c.`business_id`, c.`business_name`, | c.`column_id`, c.`popularity`, c.`merchant_id`, c.`business_id`, c.`business_name`, | ||||
| m.name merchant_name, m.img_url merchant_pic | m.name merchant_name, m.img_url merchant_pic | ||||
| </sql> | </sql> | ||||
| @@ -101,6 +102,10 @@ | |||||
| and c.`status` = #{status} | and c.`status` = #{status} | ||||
| </if> | </if> | ||||
| <if test=" null != mark"> | |||||
| and c.`mark` = #{mark} | |||||
| </if> | |||||
| <if test="startdate != null"> | <if test="startdate != null"> | ||||
| and c.`create_date` >= #{startdate} | and c.`create_date` >= #{startdate} | ||||
| </if> | </if> | ||||
| @@ -123,8 +128,7 @@ | |||||
| </foreach> | </foreach> | ||||
| </if> | </if> | ||||
| order by c.`update_date` desc | |||||
| <!--<if test=" null != sortColumns">order by ${sortColumns}</if>--> | |||||
| <if test=" null != sortColumns">order by ${sortColumns}</if> | |||||
| </sql> | </sql> | ||||
| <select id="findList" parameterType="com.iformall.domain.po.tt.TtCoupon" resultMap="BaseResultMap"> | <select id="findList" parameterType="com.iformall.domain.po.tt.TtCoupon" resultMap="BaseResultMap"> | ||||
| @@ -31,6 +31,7 @@ | |||||
| <result column="qr_code" jdbcType="VARCHAR" property="qrCode"/> | <result column="qr_code" jdbcType="VARCHAR" property="qrCode"/> | ||||
| <result column="introduction" jdbcType="VARCHAR" property="introduction"/> | <result column="introduction" jdbcType="VARCHAR" property="introduction"/> | ||||
| <result column="action_desc" jdbcType="VARCHAR" property="actionDesc"/> | <result column="action_desc" jdbcType="VARCHAR" property="actionDesc"/> | ||||
| <result column="mark" jdbcType="INTEGER" property="mark"/> | |||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| <result column="talk_user_main" jdbcType="VARCHAR" property="talkUserMain"/> | <result column="talk_user_main" jdbcType="VARCHAR" property="talkUserMain"/> | ||||
| <result column="talk_user_aux" jdbcType="VARCHAR" property="talkUserAux"/> | <result column="talk_user_aux" jdbcType="VARCHAR" property="talkUserAux"/> | ||||
| @@ -38,6 +39,7 @@ | |||||
| <result column="rental_start_date" property="rentalStartDate"/> | <result column="rental_start_date" property="rentalStartDate"/> | ||||
| <result column="rental_end_date" property="rentalEndDate"/> | <result column="rental_end_date" property="rentalEndDate"/> | ||||
| <result column="credit_locked" property="creditLocked"/> | <result column="credit_locked" property="creditLocked"/> | ||||
| <result column="entry_amount" jdbcType="INTEGER" property="entryAmount"/> | |||||
| <result column="cash_out_number" jdbcType="INTEGER" property="cashOutNumber"/> | <result column="cash_out_number" jdbcType="INTEGER" property="cashOutNumber"/> | ||||
| <result column="cash_out_count" jdbcType="INTEGER" property="cashOutCount"/> | <result column="cash_out_count" jdbcType="INTEGER" property="cashOutCount"/> | ||||
| <result column="cash_out_last_time" jdbcType="TIMESTAMP" property="cashOutLastTime"/> | <result column="cash_out_last_time" jdbcType="TIMESTAMP" property="cashOutLastTime"/> | ||||
| @@ -46,13 +48,13 @@ | |||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`img_url`,`name`,`encode`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`, | `id`,`tenant_id`,`parent_tenant_id`,`img_url`,`name`,`encode`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`, | ||||
| `business_id`,`business_types`,`sub_business_id`,`shop_type`,`brand`,`type`,`is_public`,email,`title`,`cover_picture`,`is_admin`,`bill_setting`,`qr_code`, | `business_id`,`business_types`,`sub_business_id`,`shop_type`,`brand`,`type`,`is_public`,email,`title`,`cover_picture`,`is_admin`,`bill_setting`,`qr_code`, | ||||
| `introduction`,`action_desc`,`is_del`,`talk_user_main`,`talk_user_aux`,link_line_phone,credit_locked,cash_out_number,cash_out_count,cash_out_last_time | |||||
| `introduction`,`action_desc`,`mark`,`is_del`,`talk_user_main`,`talk_user_aux`,link_line_phone,credit_locked,credit_locked,entry_amount,cash_out_count,cash_out_last_time | |||||
| </sql> | </sql> | ||||
| <sql id="allColumnsVo"> | <sql id="allColumnsVo"> | ||||
| m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`img_url`,m.`name`,m.`encode`,m.`link_phone`,m.`create_date`,m.`update_date`,m.`car_vendor_type`,m.`car_params`,m.`status`,m.`link_person`, | m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`img_url`,m.`name`,m.`encode`,m.`link_phone`,m.`create_date`,m.`update_date`,m.`car_vendor_type`,m.`car_params`,m.`status`,m.`link_person`, | ||||
| m.`business_id`,m.`business_types`,m.`sub_business_id`,m.`shop_type`,m.`brand`,m.`type`,m.`is_public`,m.email,m.`title`,m.`cover_picture`,m.`is_admin`,m.`bill_setting`,m.`qr_code`, | m.`business_id`,m.`business_types`,m.`sub_business_id`,m.`shop_type`,m.`brand`,m.`type`,m.`is_public`,m.email,m.`title`,m.`cover_picture`,m.`is_admin`,m.`bill_setting`,m.`qr_code`, | ||||
| m.`introduction`,m.`action_desc`,m.`is_del`,m.`talk_user_main`,m.`talk_user_aux`,m.link_line_phone,r.rental_start_date,r.rental_end_date,m.cash_out_number,m.cash_out_count,m.cash_out_last_time | |||||
| m.`introduction`,m.`action_desc`,m.`mark`,m.`is_del`,m.`talk_user_main`,m.`talk_user_aux`,m.link_line_phone,r.rental_start_date,r.rental_end_date,m.entry_amount,m.cash_out_number,m.cash_out_count,m.cash_out_last_time | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -130,6 +132,9 @@ | |||||
| <if test=" null != isAdmin "> | <if test=" null != isAdmin "> | ||||
| and `is_admin` = #{isAdmin} | and `is_admin` = #{isAdmin} | ||||
| </if> | </if> | ||||
| <if test=" null != mark "> | |||||
| and `mark` = #{mark} | |||||
| </if> | |||||
| <if test=" null != isDel "> | <if test=" null != isDel "> | ||||
| and `is_del` = #{isDel} | and `is_del` = #{isDel} | ||||
| </if> | </if> | ||||
| @@ -328,6 +333,9 @@ | |||||
| <if test=" null != isAdmin "> | <if test=" null != isAdmin "> | ||||
| and m.`is_admin` = #{isAdmin} | and m.`is_admin` = #{isAdmin} | ||||
| </if> | </if> | ||||
| <if test=" null != mark "> | |||||
| and m.`mark` = #{mark} | |||||
| </if> | |||||
| <if test=" null != isDel "> | <if test=" null != isDel "> | ||||
| and m.`is_del` = #{isDel} | and m.`is_del` = #{isDel} | ||||
| </if> | </if> | ||||
| @@ -7,6 +7,7 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxBusiness; | import com.iformall.domain.po.WxBusiness; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.base.BaseEntity; | |||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| import com.iformall.domain.po.tt.TtCoupon; | import com.iformall.domain.po.tt.TtCoupon; | ||||
| import com.iformall.domain.po.tt.TtVideoLibrary; | import com.iformall.domain.po.tt.TtVideoLibrary; | ||||
| @@ -74,6 +75,13 @@ public class TtCouponController extends BaseController { | |||||
| // }else{ | // }else{ | ||||
| // record.setType(EnumTtCouponType.COUPON_COLUMN.getCode()); | // record.setType(EnumTtCouponType.COUPON_COLUMN.getCode()); | ||||
| // } | // } | ||||
| if(StringUtils.isNotBlank(record.getSortColumn())){ | |||||
| String coryColumn = "c."+record.getSortColumns(); | |||||
| record.setSortColumns(coryColumn); | |||||
| record.setSortColumn(null); | |||||
| }else{ | |||||
| record.setSortColumns(BaseEntity.SortField.CUpdateDate_DESC); | |||||
| } | |||||
| return new ResultData(ttCouponService.listAsPage(record, pageNum, pageSize)); | return new ResultData(ttCouponService.listAsPage(record, pageNum, pageSize)); | ||||
| } | } | ||||
| @@ -3,6 +3,7 @@ package com.iformall.controller; | |||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.base.BaseEntity; | |||||
| import com.iformall.domain.po.tt.TtCoupon; | import com.iformall.domain.po.tt.TtCoupon; | ||||
| import com.iformall.enums.EnumTtCouponStatus; | import com.iformall.enums.EnumTtCouponStatus; | ||||
| import com.iformall.enums.EnumYesOrNo; | import com.iformall.enums.EnumYesOrNo; | ||||
| @@ -16,6 +17,7 @@ import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| import io.swagger.annotations.ApiOperation; | import io.swagger.annotations.ApiOperation; | ||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -52,6 +54,13 @@ public class TtCouponController extends BaseController { | |||||
| logger.debug("[" + getIpAddr() + "] TtCouponController::list"); | logger.debug("[" + getIpAddr() + "] TtCouponController::list"); | ||||
| if (record == null) record = new TtCoupon(); | if (record == null) record = new TtCoupon(); | ||||
| record.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_SHELFING.getCode()); | record.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_SHELFING.getCode()); | ||||
| if(StringUtils.isNotBlank(record.getSortColumn())){ | |||||
| String coryColumn = "c."+record.getSortColumns(); | |||||
| record.setSortColumns(coryColumn); | |||||
| record.setSortColumn(null); | |||||
| }else{ | |||||
| record.setSortColumns(BaseEntity.SortField.CUpdateDate_DESC); | |||||
| } | |||||
| return new ResultData(ttCouponService.listAsPage(record, pageNum, pageSize)); | return new ResultData(ttCouponService.listAsPage(record, pageNum, pageSize)); | ||||
| } | } | ||||