11 changed files with 171 additions and 2 deletions
@ -0,0 +1,42 @@ |
|||
package com.epmet.plugin.power.dto.axis; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class ResultDTO { |
|||
/** |
|||
* 状态码 |
|||
*/ |
|||
int code; |
|||
/** |
|||
* 接口信息 |
|||
*/ |
|||
String msg; |
|||
/** |
|||
* 返回数据 |
|||
*/ |
|||
Object data; |
|||
/** |
|||
* 数据总条数 |
|||
*/ |
|||
Long total; |
|||
|
|||
private final static String MSG_DEFAULT_SUCCESS = "success"; |
|||
private final static int CODE_DEFAULT_ERROR = 300; |
|||
|
|||
public ResultDTO() { |
|||
|
|||
} |
|||
|
|||
public ResultDTO(int code, String msg, Object data, Long total) { |
|||
this.code = code; |
|||
this.msg = msg; |
|||
this.data = data; |
|||
this.total = total; |
|||
} |
|||
|
|||
|
|||
public static ResultDTO success(String msg, Object data, long total) { |
|||
return new ResultDTO(0, msg, data, total); |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
package com.epmet.plugin.power.dto.axis.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class PowerAxisLeaderDetailFormDTO { |
|||
private String agencyId; |
|||
private String leaderId; |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.epmet.plugin.power.dto.axis.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class PowerKernelHouseHoldViewListFormDTO { |
|||
private String axisStructId; |
|||
private int pageNo; |
|||
private int pageSize; |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.epmet.plugin.power.dto.axis.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class PowerAxisLeaderDetailResultDTO { |
|||
private String name; |
|||
private String gender; |
|||
private String mobile; |
|||
private String introduction; |
|||
private String categoryName; |
|||
private String avatar; |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.epmet.plugin.power.dto.axis.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
@Data |
|||
public class PowerKernelHouseHoldViewListResultDTO { |
|||
private String ownerName; |
|||
private String houseId; |
|||
private String address; |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.epmet.plugin.power.modules.axis.ViewController; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.plugin.power.dto.axis.ResultDTO; |
|||
import com.epmet.plugin.power.dto.axis.form.PowerKernelHouseHoldViewListFormDTO; |
|||
import com.epmet.plugin.power.dto.axis.result.PowerKernelHouseHoldViewListResultDTO; |
|||
import com.epmet.plugin.power.modules.axis.service.PowerKernelHouseholdService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
|
|||
|
|||
@RestController |
|||
@RequestMapping("/data/kernelHousehold") |
|||
public class PowerAxiskernelHouseholdViewController { |
|||
|
|||
@Autowired |
|||
private PowerKernelHouseholdService powerKernelHouseholdService; |
|||
|
|||
|
|||
/** |
|||
* 党员中心户列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
public ResultDTO getList(@RequestBody PowerKernelHouseHoldViewListFormDTO form){ |
|||
PowerKernelHouseHoldViewListResultDTO dto = powerKernelHouseholdService.getList(form); |
|||
return ResultDTO.success("查询成功",dto,powerKernelHouseholdService.getTotal(form)); |
|||
} |
|||
} |
Loading…
Reference in new issue