| @@ -182,4 +182,13 @@ public class WxMerchantController extends BaseController { | |||||
| wxMerchantService.exportData(wxMerchant,request,response); | wxMerchantService.exportData(wxMerchant,request,response); | ||||
| } | } | ||||
| @ApiOperation("置顶") | |||||
| @PostMapping("top") | |||||
| @SystemControllerLog(description = "商户-置顶") | |||||
| public ResultData top(@RequestBody WxMerchant wxMerchant) { | |||||
| logger.debug("[" + getIpAddr() + "] WxMerchantController::top"); | |||||
| wxMerchant.setTenantId(getTenantId()); | |||||
| return wxMerchantService.top(wxMerchant); | |||||
| } | |||||
| } | } | ||||
| @@ -0,0 +1 @@ | |||||
| alter table wx_merchant add column top_time datetime default now() comment '置顶时间'; | |||||
| @@ -5,7 +5,6 @@ import cn.afterturn.easypoi.excel.annotation.Excel; | |||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Table; | import javax.persistence.Table; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.io.Serializable; | |||||
| import java.math.BigDecimal; | import java.math.BigDecimal; | ||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -182,6 +181,17 @@ public class WxMerchant extends BaseEntity { | |||||
| @Excel(name="待缴提醒(提前X天)",width = 20,orderNum = "12") | @Excel(name="待缴提醒(提前X天)",width = 20,orderNum = "12") | ||||
| private Integer billSetting; | private Integer billSetting; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "置顶时间", name = "topTime") | |||||
| private Date topTime; | |||||
| public Date getTopTime() { | |||||
| return topTime; | |||||
| } | |||||
| public void setTopTime(Date topTime) { | |||||
| this.topTime = topTime; | |||||
| } | |||||
| public Integer getBillSetting() { | public Integer getBillSetting() { | ||||
| return billSetting; | return billSetting; | ||||
| } | } | ||||
| @@ -2,7 +2,6 @@ package com.iformall.service; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.domain.po.WxLevelConfig; | |||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.vo.WxMerchantSimpleVo; | import com.iformall.domain.vo.WxMerchantSimpleVo; | ||||
| import com.iformall.domain.vo.WxMerchantVo; | import com.iformall.domain.vo.WxMerchantVo; | ||||
| @@ -87,4 +86,7 @@ public interface WxMerchantService { | |||||
| WxMerchant findOne(WxMerchant wxMerchant); | WxMerchant findOne(WxMerchant wxMerchant); | ||||
| void exportData(WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response); | void exportData(WxMerchant wxMerchant, HttpServletRequest request, HttpServletResponse response); | ||||
| ResultData top(WxMerchant wxMerchant); | |||||
| } | } | ||||
| @@ -611,4 +611,17 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| excelService.exportExcel(list,null,"商户信息",WxMerchant.class,"商户信息数据.xls",response); | excelService.exportExcel(list,null,"商户信息",WxMerchant.class,"商户信息数据.xls",response); | ||||
| } | } | ||||
| @Override | |||||
| public ResultData top(WxMerchant wxMerchant) { | |||||
| if (wxMerchant == null) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "未选择要置顶的商户"); | |||||
| } | |||||
| if (wxMerchant.getId() == null) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "未选择要置顶的商户"); | |||||
| } | |||||
| wxMerchant.setTopTime(new Date()); | |||||
| wxMerchantMapper.updateByPrimaryKeySelective(wxMerchant); | |||||
| return new ResultData(Result.SUCCESS, "操作成功"); | |||||
| } | |||||
| } | } | ||||
| @@ -205,7 +205,7 @@ | |||||
| <if test=" null != id"> | <if test=" null != id"> | ||||
| and m.`id` = #{id} | and m.`id` = #{id} | ||||
| </if> | </if> | ||||
| order by m.top_time desc | |||||
| </select> | </select> | ||||
| <select id="queryMerchantByMerchantIdOfSharingReceiver" resultType="com.iformall.domain.po.WxMerchant" | <select id="queryMerchantByMerchantIdOfSharingReceiver" resultType="com.iformall.domain.po.WxMerchant" | ||||