提交代码

dev-discount
袁野 3 years ago
parent c47be8cbd7
commit f44cf3eb71
  1. 3
      hai-bweb/src/main/java/com/bweb/controller/HighActivityInfoController.java
  2. 13
      hai-bweb/src/main/java/com/bweb/controller/HighGoldRecController.java
  3. 2
      hai-cweb/src/main/resources/pre/application.yml
  4. 5
      hai-service/src/main/java/com/hai/service/impl/HighGoldRecServiceImpl.java

@ -41,6 +41,7 @@ import java.util.*;
@Controller
@RequestMapping(value = "/activity")
@Api(value = "活动业务接口")
public class HighActivityInfoController {
private static Logger log = LoggerFactory.getLogger(HighActivityInfoController.class);
@ -196,7 +197,7 @@ public class HighActivityInfoController {
@RequestMapping(value = "/getList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询活动列表")
public ResponseData getList(@RequestParam(value = "title", required = false) Integer title,
public ResponseData getList(@RequestParam(value = "title", required = false) String title,
@RequestParam(value = "type", required = false) Integer type,
@RequestParam(value = "status", required = false) Integer status,
@RequestParam(value = "pageNum", required = true) Integer pageNum,

@ -9,6 +9,7 @@ import com.hai.model.ResponseData;
import com.hai.service.HighGoldRecService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.MapUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@ -50,11 +52,9 @@ public class HighGoldRecController {
Map<String, Object> map = new HashMap<>();
map.put("goldType", goldType);
map.put("resType", resType);
map.put("createTimeS", createTimeS);
map.put("createTimeE", createTimeE);
if (createTimeS != null) {
map.put("createTimeS", DateUtil.long2Date(createTimeS));
map.put("createTimeE", DateUtil.long2Date(createTimeE));
}
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highGoldRecService.getGoldRec(map)));
@ -77,8 +77,9 @@ public class HighGoldRecController {
map.put("goldType", goldType);
map.put("resType", resType);
if (createTimeS != null) {
map.put("createTimeS", DateUtil.long2Date(createTimeS));
map.put("createTimeE", DateUtil.long2Date(createTimeE));
map.put("createTimeS", DateUtil.date2String(new Date(createTimeS), "yyyy-MM-dd"));
map.put("createTimeE", DateUtil.date2String(new Date(createTimeE), "yyyy-MM-dd"));
}
return ResponseMsgUtil.success(highGoldRecService.queryGold(map));

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
z
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -10,6 +10,7 @@ import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -50,6 +51,10 @@ public class HighGoldRecServiceImpl implements HighGoldRecService {
criteria.andResTypeEqualTo(MapUtils.getInteger(map, "resType"));
}
if (MapUtils.getLong(map , "createTimeS") != null) {
criteria.andCreateTimeBetween(new Date(MapUtils.getLong(map , "createTimeS")) , new Date(MapUtils.getLong(map , "createTimeE")));
}
example.setOrderByClause("create_time desc");
List<HighGoldRec> list = highGoldRecMapper.selectByExample(example);
for (HighGoldRec highGoldRec : list) {

Loading…
Cancel
Save