| @@ -57,7 +57,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||||
| wxMerchantSubsidy.setStatusS(tmpList); | wxMerchantSubsidy.setStatusS(tmpList); | ||||
| } | } | ||||
| } | } | ||||
| Map retMap = wxMerchantSubsidyService.sumForSubsidy(wxMerchantSubsidy); | |||||
| List<Map<String, Object>> retMap = wxMerchantSubsidyService.sumForSubsidy(wxMerchantSubsidy); | |||||
| return new ResultData(retMap); | return new ResultData(retMap); | ||||
| } | } | ||||
| @@ -67,7 +67,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | ||||
| @SystemControllerLog(description = "商户-补贴记录-列表") | @SystemControllerLog(description = "商户-补贴记录-列表") | ||||
| public ResultData listMonth(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy, Integer pageNum, Integer pageSize) { | |||||
| public ResultData listMonth(@ModelAttribute WxMerchantSubsidyVo wxMerchantSubsidy, Integer pageNum, Integer pageSize) { | |||||
| String ipStr = getIpAddr(); | String ipStr = getIpAddr(); | ||||
| logger.info("subsidy/list: " + ipStr + " :" + wxMerchantSubsidy.toString()); | logger.info("subsidy/list: " + ipStr + " :" + wxMerchantSubsidy.toString()); | ||||
| if (wxMerchantSubsidy == null) { | if (wxMerchantSubsidy == null) { | ||||
| @@ -13,6 +13,8 @@ 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; | ||||
| import org.springframework.web.bind.annotation.*; | import org.springframework.web.bind.annotation.*; | ||||
| import java.util.List; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| @RestController | @RestController | ||||
| @@ -32,7 +34,7 @@ public class WxMerchantSubsidyController extends BaseController { | |||||
| WxMerchantBUser user = getUser(); | WxMerchantBUser user = getUser(); | ||||
| wxMerchantSubsidy.setTenantId(user.getTenantId()); | wxMerchantSubsidy.setTenantId(user.getTenantId()); | ||||
| wxMerchantSubsidy.setMerchantId(user.getMerchantId()); | wxMerchantSubsidy.setMerchantId(user.getMerchantId()); | ||||
| Map retMap = wxMerchantSubsidyService.sumForSubsidy(wxMerchantSubsidy); | |||||
| List<Map<String, Object>> retMap = wxMerchantSubsidyService.sumForSubsidy(wxMerchantSubsidy); | |||||
| return new ResultData(retMap); | return new ResultData(retMap); | ||||
| } | } | ||||
| @@ -41,10 +43,10 @@ public class WxMerchantSubsidyController extends BaseController { | |||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | ||||
| public ResultData listMonth(@ModelAttribute WxMerchantSubsidy wxMerchantSubsidy, Integer pageNum, Integer pageSize) { | |||||
| public ResultData listMonth(@ModelAttribute WxMerchantSubsidyVo wxMerchantSubsidy, Integer pageNum, Integer pageSize) { | |||||
| String ipStr = getIpAddr(); | String ipStr = getIpAddr(); | ||||
| logger.info("subsidy/list: " + ipStr + " :" + wxMerchantSubsidy.toString()); | logger.info("subsidy/list: " + ipStr + " :" + wxMerchantSubsidy.toString()); | ||||
| if (wxMerchantSubsidy == null) wxMerchantSubsidy = new WxMerchantSubsidy(); | |||||
| if (wxMerchantSubsidy == null) wxMerchantSubsidy = new WxMerchantSubsidyVo(); | |||||
| WxMerchantBUser user = getUser(); | WxMerchantBUser user = getUser(); | ||||
| wxMerchantSubsidy.setTenantId(user.getTenantId()); | wxMerchantSubsidy.setTenantId(user.getTenantId()); | ||||
| wxMerchantSubsidy.setMerchantId(user.getMerchantId()); | wxMerchantSubsidy.setMerchantId(user.getMerchantId()); | ||||
| @@ -13,6 +13,6 @@ public interface WxMerchantSubsidyMapper extends CommonMapper<WxMerchantSubsidy, | |||||
| List<WxMerchantSubsidyVo> findVoList(WxMerchantSubsidy wxMerchantSubsidy); | List<WxMerchantSubsidyVo> findVoList(WxMerchantSubsidy wxMerchantSubsidy); | ||||
| Map<String, Object> sumVoList(WxMerchantSubsidy wxMerchantSubsidy); | |||||
| List<Map<String, Object>> sumVoList(WxMerchantSubsidy wxMerchantSubsidy); | |||||
| } | } | ||||
| @@ -7,6 +7,7 @@ import com.iformall.domain.vo.WxMerchantSubsidyVo; | |||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import java.util.List; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| public interface WxMerchantSubsidyService { | public interface WxMerchantSubsidyService { | ||||
| @@ -16,7 +17,7 @@ public interface WxMerchantSubsidyService { | |||||
| * @param record | * @param record | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| Map<String, Object> sumForSubsidy(WxMerchantSubsidy record); | |||||
| List<Map<String, Object>> sumForSubsidy(WxMerchantSubsidy record); | |||||
| /** | /** | ||||
| * 根据实体查询分页列表 | * 根据实体查询分页列表 | ||||
| @@ -26,7 +27,7 @@ public interface WxMerchantSubsidyService { | |||||
| * @param pageSize | * @param pageSize | ||||
| * @return | * @return | ||||
| */ | */ | ||||
| PageInfo<WxMerchantSubsidyVo> listAsPage(WxMerchantSubsidy record, Integer pageIndex, Integer pageSize); | |||||
| PageInfo<WxMerchantSubsidyVo> listAsPage(WxMerchantSubsidyVo record, Integer pageIndex, Integer pageSize); | |||||
| /** | /** | ||||
| * 根据Id获得实体 | * 根据Id获得实体 | ||||
| @@ -31,12 +31,12 @@ public class WxMerchantSubsidyServiceImpl implements WxMerchantSubsidyService { | |||||
| ExcelService excelService; | ExcelService excelService; | ||||
| @Override | @Override | ||||
| public Map<String, Object> sumForSubsidy(WxMerchantSubsidy record) { | |||||
| public List<Map<String, Object>> sumForSubsidy(WxMerchantSubsidy record) { | |||||
| return wxMerchantSubsidyMapper.sumVoList(record); | return wxMerchantSubsidyMapper.sumVoList(record); | ||||
| } | } | ||||
| @Override | @Override | ||||
| public PageInfo<WxMerchantSubsidyVo> listAsPage(WxMerchantSubsidy record, Integer pageIndex, Integer pageSize) { | |||||
| public PageInfo<WxMerchantSubsidyVo> listAsPage(WxMerchantSubsidyVo record, Integer pageIndex, Integer pageSize) { | |||||
| return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantSubsidyMapper.findVoList(record)); | return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxMerchantSubsidyMapper.findVoList(record)); | ||||
| } | } | ||||
| @@ -185,6 +185,9 @@ | |||||
| <if test=" null != startdate and null!=enddate"> | <if test=" null != startdate and null!=enddate"> | ||||
| and t.`create_date` between #{startdate} and #{enddate} | and t.`create_date` between #{startdate} and #{enddate} | ||||
| </if> | </if> | ||||
| <if test=" null != title"> | |||||
| and t.`title` like concat('%', #{title},'%') | |||||
| </if> | |||||
| <if test=" null != statusS "> | <if test=" null != statusS "> | ||||
| and t.`status` in | and t.`status` in | ||||
| <foreach collection="statusS" index="index" item="sItem" open="(" separator="," close=")"> | <foreach collection="statusS" index="index" item="sItem" open="(" separator="," close=")"> | ||||
| @@ -200,7 +203,7 @@ | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| </sql> | </sql> | ||||
| <select id="findVoList" parameterType="com.iformall.domain.po.WxMerchantSubsidy" resultMap="VoBaseResultMap"> | |||||
| <select id="findVoList" parameterType="com.iformall.domain.vo.WxMerchantSubsidyVo" resultMap="VoBaseResultMap"> | |||||
| select * from | select * from | ||||
| ( | ( | ||||
| select <include refid="allVoColumns" /> | select <include refid="allVoColumns" /> | ||||