...
|
...
|
@@ -2,11 +2,14 @@ package com.sunyo.energy.location.controller; |
|
|
|
|
|
import com.sunyo.energy.location.controller.response.ResultJson;
|
|
|
import com.sunyo.energy.location.dao.LocationMapper;
|
|
|
import com.sunyo.energy.location.dao.USERSMapper;
|
|
|
import com.sunyo.energy.location.model.USERS;
|
|
|
import com.sunyo.energy.location.service.LocationService;
|
|
|
import com.sunyo.energy.location.service.WaterMeterService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
...
|
...
|
@@ -31,11 +34,14 @@ public class UserPayController { |
|
|
@Autowired
|
|
|
private LocationMapper locationMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private USERSMapper usersMapper;
|
|
|
|
|
|
@ApiOperation(value = "查看缴费房间")
|
|
|
@RequestMapping("/list")
|
|
|
public List userPayList(@RequestParam(value = "roomNumber", required = false) String roomNumber) {
|
|
|
|
|
|
return locationService.userPayList(roomNumber);
|
|
|
return locationService.userPayList(roomNumber, 0);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "充值水费")
|
...
|
...
|
@@ -60,15 +66,16 @@ public class UserPayController { |
|
|
|
|
|
@ApiOperation(value = "钉钉小程序请求水电返回数据")
|
|
|
@PostMapping("/mincData")
|
|
|
public Map<String, Object> mincData(@RequestParam(value = "loginName", required = false) String loginName) {
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
/**
|
|
|
* 查询该账号所绑定的水电编号
|
|
|
*/
|
|
|
|
|
|
|
|
|
return map;
|
|
|
public List mincData(@RequestParam(value = "userName", required = false) String userName,
|
|
|
@RequestParam(value = "mobile", required = false) String mobile) {
|
|
|
|
|
|
USERS users = usersMapper.findRoomNumber(mobile);
|
|
|
if (!StringUtils.isEmpty(users.getUsername())){
|
|
|
List list = locationService.userPayList(users.getUsername(), users.getUserId());
|
|
|
return list;
|
|
|
}else {
|
|
|
return null;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|