新增业务与用户关联
This commit is contained in:
parent
51d6b70ba9
commit
97941cb489
@ -0,0 +1,111 @@
|
||||
package cn.com.tenlion.usercenter.controller.api.business;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.business.BusinessDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.business.BusinessVO;
|
||||
import cn.com.tenlion.usercenter.service.business.IBusinessService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessController
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "业务接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/business")
|
||||
public class BusinessController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IBusinessService businessService;
|
||||
|
||||
@ApiOperation(value = "新增业务", notes = "新增业务接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody BusinessVO businessVO) {
|
||||
businessService.save(businessVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除业务", notes = "删除业务接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
businessService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改业务", notes = "修改业务接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "businessId", value = "业务ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{businessId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("businessId") String businessId, @RequestBody BusinessVO businessVO) {
|
||||
businessService.update(businessId, businessVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务详情", notes = "业务详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "businessId", value = "业务ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{businessId}")
|
||||
public BusinessDTO get(@PathVariable("businessId") String businessId) {
|
||||
return businessService.get(businessId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务列表", notes = "业务列表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<BusinessDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return businessService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务分页列表", notes = "业务分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<BusinessDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return businessService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务统计", notes = "业务统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(businessService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package cn.com.tenlion.usercenter.controller.api.businessuser;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.businessuser.BusinessUserDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.businessuser.BusinessUserVO;
|
||||
import cn.com.tenlion.usercenter.service.businessuser.IBusinessUserService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessUserController
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "业务用户接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.API_PREFIX + "/business-user")
|
||||
public class BusinessUserController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IBusinessUserService businessUserService;
|
||||
|
||||
@ApiOperation(value = "新增业务用户", notes = "新增业务用户接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody BusinessUserVO businessUserVO) {
|
||||
businessUserService.save(businessUserVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除业务用户", notes = "删除业务用户接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
businessUserService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改业务用户", notes = "修改业务用户接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "businessUserId", value = "业务用户ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{businessUserId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("businessUserId") String businessUserId, @RequestBody BusinessUserVO businessUserVO) {
|
||||
businessUserService.update(businessUserId, businessUserVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户详情", notes = "业务用户详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "businessUserId", value = "业务用户ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{businessUserId}")
|
||||
public BusinessUserDTO get(@PathVariable("businessUserId") String businessUserId) {
|
||||
return businessUserService.get(businessUserId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户列表", notes = "业务用户列表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<BusinessUserDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return businessUserService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户分页列表", notes = "业务用户分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<BusinessUserDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return businessUserService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户统计", notes = "业务用户统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(businessUserService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.usercenter.controller.app.api.business;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.business.BusinessDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.business.BusinessVO;
|
||||
import cn.com.tenlion.usercenter.service.business.IBusinessService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessAppController
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "业务接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.APP_PREFIX + "/business")
|
||||
public class BusinessAppController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IBusinessService businessService;
|
||||
|
||||
@ApiOperation(value = "新增业务", notes = "新增业务接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestHeader("token") String token, @RequestBody BusinessVO businessVO) {
|
||||
businessService.save(token, businessVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除业务(id列表)", notes = "删除业务(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) {
|
||||
businessService.remove(token, Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改业务", notes = "修改业务接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "businessId", value = "业务ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("updatebusiness/{businessId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult updateBusiness(@RequestHeader("token") String token, @PathVariable("businessId") String businessId, @RequestBody BusinessVO businessVO) {
|
||||
businessService.update(token, businessId, businessVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务详情(通过ID)", notes = "业务详情(通过ID)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "businessId", value = "业务ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{businessId}")
|
||||
public BusinessDTO get(@RequestHeader("token") String token, @PathVariable("businessId") String businessId) {
|
||||
return businessService.get(businessId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务列表", notes = "业务列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<BusinessDTO> list(@RequestHeader("token") String token) {
|
||||
Map<String, Object> params = requestParams();
|
||||
return businessService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务分页列表", notes = "业务分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<BusinessDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return businessService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务统计", notes = "业务统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(businessService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.usercenter.controller.app.api.businessuser;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.businessuser.BusinessUserDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.businessuser.BusinessUserVO;
|
||||
import cn.com.tenlion.usercenter.service.businessuser.IBusinessUserService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessUserAppController
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "业务用户接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.APP_PREFIX + "/business-user")
|
||||
public class BusinessUserAppController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IBusinessUserService businessUserService;
|
||||
|
||||
@ApiOperation(value = "新增业务用户", notes = "新增业务用户接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestHeader("token") String token, @RequestBody BusinessUserVO businessUserVO) {
|
||||
businessUserService.save(token, businessUserVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除业务用户(id列表)", notes = "删除业务用户(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) {
|
||||
businessUserService.remove(token, Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改业务用户", notes = "修改业务用户接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "businessUserId", value = "业务用户ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("updatebusinessuser/{businessUserId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult updateBusinessUser(@RequestHeader("token") String token, @PathVariable("businessUserId") String businessUserId, @RequestBody BusinessUserVO businessUserVO) {
|
||||
businessUserService.update(token, businessUserId, businessUserVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户详情(通过ID)", notes = "业务用户详情(通过ID)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "businessUserId", value = "业务用户ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{businessUserId}")
|
||||
public BusinessUserDTO get(@RequestHeader("token") String token, @PathVariable("businessUserId") String businessUserId) {
|
||||
return businessUserService.get(businessUserId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户列表", notes = "业务用户列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<BusinessUserDTO> list(@RequestHeader("token") String token) {
|
||||
Map<String, Object> params = requestParams();
|
||||
return businessUserService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户分页列表", notes = "业务用户分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<BusinessUserDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return businessUserService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户统计", notes = "业务用户统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(businessUserService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.usercenter.controller.resource.business;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.business.BusinessDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.business.BusinessVO;
|
||||
import cn.com.tenlion.usercenter.service.business.IBusinessService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessResourceController
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "业务接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/business")
|
||||
public class BusinessResourceController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IBusinessService businessService;
|
||||
|
||||
@ApiOperation(value = "新增业务", notes = "新增业务接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody BusinessVO businessVO) {
|
||||
businessService.save(businessVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除业务(id列表)", notes = "删除业务(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
businessService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改业务", notes = "修改业务接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "businessId", value = "业务ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{businessId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("businessId") String businessId, @RequestBody BusinessVO businessVO) {
|
||||
businessService.update(businessId, businessVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务详情", notes = "业务详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "businessId", value = "业务ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{businessId}")
|
||||
public BusinessDTO get(@PathVariable("businessId") String businessId) {
|
||||
return businessService.get(businessId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务列表", notes = "业务列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<BusinessDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return businessService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务分页列表", notes = "业务分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<BusinessDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return businessService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务统计", notes = "业务统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(businessService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.usercenter.controller.resource.businessuser;
|
||||
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.businessuser.BusinessUserDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.businessuser.BusinessUserVO;
|
||||
import cn.com.tenlion.usercenter.service.businessuser.IBusinessUserService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessUserResourceController
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "业务用户接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/business-user")
|
||||
public class BusinessUserResourceController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IBusinessUserService businessUserService;
|
||||
|
||||
@ApiOperation(value = "新增业务用户", notes = "新增业务用户接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody BusinessUserVO businessUserVO) {
|
||||
businessUserService.save(businessUserVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除业务用户(id列表)", notes = "删除业务用户(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
businessUserService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改业务用户", notes = "修改业务用户接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "businessUserId", value = "业务用户ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{businessUserId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("businessUserId") String businessUserId, @RequestBody BusinessUserVO businessUserVO) {
|
||||
businessUserService.update(businessUserId, businessUserVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户详情", notes = "业务用户详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "businessUserId", value = "业务用户ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{businessUserId}")
|
||||
public BusinessUserDTO get(@PathVariable("businessUserId") String businessUserId) {
|
||||
return businessUserService.get(businessUserId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户列表", notes = "业务用户列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<BusinessUserDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return businessUserService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户分页列表", notes = "业务用户分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<BusinessUserDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
page.setParams(params);
|
||||
return businessUserService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "业务用户统计", notes = "业务用户统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(businessUserService.count(params));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.com.tenlion.usercenter.controller.route.business;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import cn.com.tenlion.usercenter.service.business.IBusinessService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessController
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "业务路由")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/business")
|
||||
public class BusinessRouteController extends DefaultBaseController {
|
||||
|
||||
@GetMapping("save")
|
||||
public ModelAndView save() {
|
||||
return new ModelAndView("business/save");
|
||||
}
|
||||
|
||||
@GetMapping("update")
|
||||
public ModelAndView update() {
|
||||
return new ModelAndView("business/update");
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list() {
|
||||
return new ModelAndView("business/list");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.com.tenlion.usercenter.controller.route.businessuser;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import cn.com.tenlion.usercenter.service.businessuser.IBusinessUserService;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessUserController
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "业务用户路由")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/business-user")
|
||||
public class BusinessUserRouteController extends DefaultBaseController {
|
||||
|
||||
@GetMapping("save")
|
||||
public ModelAndView save() {
|
||||
return new ModelAndView("business-user/save");
|
||||
}
|
||||
|
||||
@GetMapping("update")
|
||||
public ModelAndView update() {
|
||||
return new ModelAndView("business-user/update");
|
||||
}
|
||||
|
||||
@GetMapping("list")
|
||||
public ModelAndView list() {
|
||||
return new ModelAndView("business-user/list");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.usercenter.dao.business;
|
||||
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import cn.com.tenlion.usercenter.pojo.bos.business.BusinessBO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.business.BusinessPO;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.business.BusinessDTO;
|
||||
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IBusinessDao
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Repository
|
||||
public interface IBusinessDao extends IInitBaseTable {
|
||||
|
||||
/**
|
||||
* 新增业务
|
||||
*
|
||||
* @param params
|
||||
* @throws SaveException
|
||||
*/
|
||||
void save(Map<String, Object> params) throws SaveException;
|
||||
|
||||
/**
|
||||
* 删除业务
|
||||
*
|
||||
* @param params
|
||||
* @throws RemoveException
|
||||
*/
|
||||
void remove(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
/**
|
||||
* 删除业务(物理)
|
||||
*
|
||||
* @param params
|
||||
* @throws RemoveException
|
||||
*/
|
||||
void delete(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
/**
|
||||
* 修改业务
|
||||
*
|
||||
* @param params
|
||||
* @throws UpdateException
|
||||
*/
|
||||
void update(Map<String, Object> params) throws UpdateException;
|
||||
|
||||
/**
|
||||
* 业务详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
BusinessDTO get(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
BusinessBO getBO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
BusinessPO getPO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<BusinessDTO> list(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<BusinessBO> listBO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<BusinessPO> listPO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务统计
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer count(Map<String, Object> params) throws SearchException;
|
||||
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package cn.com.tenlion.usercenter.dao.businessuser;
|
||||
|
||||
import cn.com.tenlion.usercenter.pojo.bos.businessuser.BusinessUserBO;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.businessuser.BusinessUserDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.businessuser.BusinessUserPO;
|
||||
import ink.wgink.exceptions.RemoveException;
|
||||
import ink.wgink.exceptions.SaveException;
|
||||
import ink.wgink.exceptions.SearchException;
|
||||
import ink.wgink.exceptions.UpdateException;
|
||||
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IBusinessUserDao
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Repository
|
||||
public interface IBusinessUserDao extends IInitBaseTable {
|
||||
|
||||
/**
|
||||
* 新增业务用户
|
||||
*
|
||||
* @param params
|
||||
* @throws SaveException
|
||||
*/
|
||||
void save(Map<String, Object> params) throws SaveException;
|
||||
|
||||
/**
|
||||
* 删除业务用户
|
||||
*
|
||||
* @param params
|
||||
* @throws RemoveException
|
||||
*/
|
||||
void remove(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
/**
|
||||
* 删除业务用户(物理)
|
||||
*
|
||||
* @param params
|
||||
* @throws RemoveException
|
||||
*/
|
||||
void delete(Map<String, Object> params) throws RemoveException;
|
||||
|
||||
/**
|
||||
* 修改业务用户
|
||||
*
|
||||
* @param params
|
||||
* @throws UpdateException
|
||||
*/
|
||||
void update(Map<String, Object> params) throws UpdateException;
|
||||
|
||||
/**
|
||||
* 业务用户详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
BusinessUserDTO get(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务用户详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
BusinessUserBO getBO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务用户详情
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
BusinessUserPO getPO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务用户列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<BusinessUserDTO> list(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务用户列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<BusinessUserBO> listBO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务用户列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<BusinessUserPO> listPO(Map<String, Object> params) throws SearchException;
|
||||
|
||||
/**
|
||||
* 业务用户统计
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
* @throws SearchException
|
||||
*/
|
||||
Integer count(Map<String, Object> params) throws SearchException;
|
||||
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package cn.com.tenlion.usercenter.pojo.bos.business;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: BusinessBO
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public class BusinessBO {
|
||||
|
||||
private String businessId;
|
||||
private String businessName;
|
||||
private String businessSummary;
|
||||
private String businessCode;
|
||||
private String creator;
|
||||
private String gmtCreate;
|
||||
private String modifier;
|
||||
private String gmtModified;
|
||||
private Integer isDelete;
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId == null ? "" : businessId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName == null ? "" : businessName.trim();
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessSummary() {
|
||||
return businessSummary == null ? "" : businessSummary.trim();
|
||||
}
|
||||
|
||||
public void setBusinessSummary(String businessSummary) {
|
||||
this.businessSummary = businessSummary;
|
||||
}
|
||||
|
||||
public String getBusinessCode() {
|
||||
return businessCode == null ? "" : businessCode.trim();
|
||||
}
|
||||
|
||||
public void setBusinessCode(String businessCode) {
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier == null ? "" : modifier.trim();
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified == null ? "" : gmtModified.trim();
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete == null ? 0 : isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.com.tenlion.usercenter.pojo.bos.businessuser;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: BusinessUserBO
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public class BusinessUserBO {
|
||||
|
||||
private String businessUserId;
|
||||
private String businessId;
|
||||
private String userId;
|
||||
|
||||
public String getBusinessUserId() {
|
||||
return businessUserId == null ? "" : businessUserId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessUserId(String businessUserId) {
|
||||
this.businessUserId = businessUserId;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId == null ? "" : businessId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId == null ? "" : userId.trim();
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package cn.com.tenlion.usercenter.pojo.dtos.business;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: BusinessDTO
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class BusinessDTO {
|
||||
|
||||
@ApiModelProperty(name = "businessId", value = "主键")
|
||||
private String businessId;
|
||||
@ApiModelProperty(name = "businessName", value = "业务名称")
|
||||
private String businessName;
|
||||
@ApiModelProperty(name = "businessSummary", value = "业务描述")
|
||||
private String businessSummary;
|
||||
@ApiModelProperty(name = "businessCode", value = "业务编码")
|
||||
private String businessCode;
|
||||
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||
private String gmtCreate;
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId == null ? "" : businessId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName == null ? "" : businessName.trim();
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessSummary() {
|
||||
return businessSummary == null ? "" : businessSummary.trim();
|
||||
}
|
||||
|
||||
public void setBusinessSummary(String businessSummary) {
|
||||
this.businessSummary = businessSummary;
|
||||
}
|
||||
|
||||
public String getBusinessCode() {
|
||||
return businessCode == null ? "" : businessCode.trim();
|
||||
}
|
||||
|
||||
public void setBusinessCode(String businessCode) {
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package cn.com.tenlion.usercenter.pojo.dtos.businessuser;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: BusinessUserDTO
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class BusinessUserDTO {
|
||||
|
||||
@ApiModelProperty(name = "businessUserId", value = "主键")
|
||||
private String businessUserId;
|
||||
@ApiModelProperty(name = "businessId", value = "业务ID")
|
||||
private String businessId;
|
||||
@ApiModelProperty(name = "userId", value = "用户ID")
|
||||
private String userId;
|
||||
|
||||
public String getBusinessUserId() {
|
||||
return businessUserId == null ? "" : businessUserId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessUserId(String businessUserId) {
|
||||
this.businessUserId = businessUserId;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId == null ? "" : businessId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId == null ? "" : userId.trim();
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package cn.com.tenlion.usercenter.pojo.pos.business;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: BusinessPO
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public class BusinessPO {
|
||||
|
||||
private String businessId;
|
||||
private String businessName;
|
||||
private String businessSummary;
|
||||
private String businessCode;
|
||||
private String creator;
|
||||
private String gmtCreate;
|
||||
private String modifier;
|
||||
private String gmtModified;
|
||||
private Integer isDelete;
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId == null ? "" : businessId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName == null ? "" : businessName.trim();
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessSummary() {
|
||||
return businessSummary == null ? "" : businessSummary.trim();
|
||||
}
|
||||
|
||||
public void setBusinessSummary(String businessSummary) {
|
||||
this.businessSummary = businessSummary;
|
||||
}
|
||||
|
||||
public String getBusinessCode() {
|
||||
return businessCode == null ? "" : businessCode.trim();
|
||||
}
|
||||
|
||||
public void setBusinessCode(String businessCode) {
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator == null ? "" : creator.trim();
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getGmtCreate() {
|
||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||
}
|
||||
|
||||
public void setGmtCreate(String gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
public String getModifier() {
|
||||
return modifier == null ? "" : modifier.trim();
|
||||
}
|
||||
|
||||
public void setModifier(String modifier) {
|
||||
this.modifier = modifier;
|
||||
}
|
||||
|
||||
public String getGmtModified() {
|
||||
return gmtModified == null ? "" : gmtModified.trim();
|
||||
}
|
||||
|
||||
public void setGmtModified(String gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete == null ? 0 : isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package cn.com.tenlion.usercenter.pojo.pos.businessuser;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: BusinessUserPO
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public class BusinessUserPO {
|
||||
|
||||
private String businessUserId;
|
||||
private String businessId;
|
||||
private String userId;
|
||||
|
||||
public String getBusinessUserId() {
|
||||
return businessUserId == null ? "" : businessUserId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessUserId(String businessUserId) {
|
||||
this.businessUserId = businessUserId;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId == null ? "" : businessId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId == null ? "" : userId.trim();
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package cn.com.tenlion.usercenter.pojo.vos.business;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: BusinessVO
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class BusinessVO {
|
||||
|
||||
@ApiModelProperty(name = "businessName", value = "业务名称")
|
||||
private String businessName;
|
||||
@ApiModelProperty(name = "businessSummary", value = "业务描述")
|
||||
private String businessSummary;
|
||||
@ApiModelProperty(name = "businessCode", value = "业务编码")
|
||||
private String businessCode;
|
||||
|
||||
public String getBusinessName() {
|
||||
return businessName == null ? "" : businessName.trim();
|
||||
}
|
||||
|
||||
public void setBusinessName(String businessName) {
|
||||
this.businessName = businessName;
|
||||
}
|
||||
|
||||
public String getBusinessSummary() {
|
||||
return businessSummary == null ? "" : businessSummary.trim();
|
||||
}
|
||||
|
||||
public void setBusinessSummary(String businessSummary) {
|
||||
this.businessSummary = businessSummary;
|
||||
}
|
||||
|
||||
public String getBusinessCode() {
|
||||
return businessCode == null ? "" : businessCode.trim();
|
||||
}
|
||||
|
||||
public void setBusinessCode(String businessCode) {
|
||||
this.businessCode = businessCode;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package cn.com.tenlion.usercenter.pojo.vos.businessuser;
|
||||
|
||||
import ink.wgink.annotation.CheckEmptyAnnotation;
|
||||
import ink.wgink.annotation.CheckNumberAnnotation;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: BusinessUserVO
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@ApiModel
|
||||
public class BusinessUserVO {
|
||||
|
||||
@ApiModelProperty(name = "businessId", value = "业务ID")
|
||||
private String businessId;
|
||||
@ApiModelProperty(name = "userId", value = "用户ID")
|
||||
private String userId;
|
||||
|
||||
public String getBusinessId() {
|
||||
return businessId == null ? "" : businessId.trim();
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId == null ? "" : userId.trim();
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
package cn.com.tenlion.usercenter.service.business;
|
||||
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.business.BusinessDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.business.BusinessVO;
|
||||
import cn.com.tenlion.usercenter.pojo.bos.business.BusinessBO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.business.BusinessPO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IBusinessService
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public interface IBusinessService {
|
||||
|
||||
/**
|
||||
* 新增业务
|
||||
*
|
||||
* @param businessVO
|
||||
* @return
|
||||
*/
|
||||
void save(BusinessVO businessVO);
|
||||
|
||||
/**
|
||||
* 新增业务
|
||||
*
|
||||
* @param token
|
||||
* @param businessVO
|
||||
* @return
|
||||
*/
|
||||
void save(String token, BusinessVO businessVO);
|
||||
|
||||
/**
|
||||
* 新增业务
|
||||
*
|
||||
* @param businessVO
|
||||
* @return businessId
|
||||
*/
|
||||
String saveReturnId(BusinessVO businessVO);
|
||||
|
||||
/**
|
||||
* 新增业务
|
||||
*
|
||||
* @param token
|
||||
* @param businessVO
|
||||
* @return businessId
|
||||
*/
|
||||
String saveReturnId(String token, BusinessVO businessVO);
|
||||
|
||||
/**
|
||||
* 删除业务
|
||||
*
|
||||
* @param ids id列表
|
||||
* @return
|
||||
*/
|
||||
void remove(List<String> ids);
|
||||
|
||||
|
||||
/**
|
||||
* 删除业务
|
||||
*
|
||||
* @param token
|
||||
* @param ids id列表
|
||||
* @return
|
||||
*/
|
||||
void remove(String token, List<String> ids);
|
||||
|
||||
/**
|
||||
* 删除业务(物理删除)
|
||||
*
|
||||
* @param ids id列表
|
||||
*/
|
||||
void delete(List<String> ids);
|
||||
|
||||
/**
|
||||
* 修改业务
|
||||
*
|
||||
* @param businessId
|
||||
* @param businessVO
|
||||
* @return
|
||||
*/
|
||||
void update(String businessId, BusinessVO businessVO);
|
||||
|
||||
/**
|
||||
* 修改业务
|
||||
*
|
||||
* @param token
|
||||
* @param businessId
|
||||
* @param businessVO
|
||||
* @return
|
||||
*/
|
||||
void update(String token, String businessId, BusinessVO businessVO);
|
||||
|
||||
/**
|
||||
* 业务详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
BusinessDTO get(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务详情
|
||||
*
|
||||
* @param businessId
|
||||
* @return
|
||||
*/
|
||||
BusinessDTO get(String businessId);
|
||||
|
||||
/**
|
||||
* 业务详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
BusinessBO getBO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务详情
|
||||
*
|
||||
* @param businessId
|
||||
* @return
|
||||
*/
|
||||
BusinessBO getBO(String businessId);
|
||||
|
||||
/**
|
||||
* 业务详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
BusinessPO getPO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务详情
|
||||
*
|
||||
* @param businessId
|
||||
* @return
|
||||
*/
|
||||
BusinessPO getPO(String businessId);
|
||||
|
||||
/**
|
||||
* 业务列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<BusinessDTO> list(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<BusinessBO> listBO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<BusinessPO> listPO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务分页列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<BusinessDTO>> listPage(ListPage page);
|
||||
|
||||
/**
|
||||
* 业务统计
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
package cn.com.tenlion.usercenter.service.business.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import cn.com.tenlion.usercenter.dao.business.IBusinessDao;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.business.BusinessDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.business.BusinessVO;
|
||||
import cn.com.tenlion.usercenter.pojo.bos.business.BusinessBO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.business.BusinessPO;
|
||||
import cn.com.tenlion.usercenter.service.business.IBusinessService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessServiceImpl
|
||||
* @Description: 业务
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:32:52
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Service
|
||||
public class BusinessServiceImpl extends DefaultBaseService implements IBusinessService {
|
||||
|
||||
@Autowired
|
||||
private IBusinessDao businessDao;
|
||||
|
||||
@Override
|
||||
public void save(BusinessVO businessVO) {
|
||||
saveReturnId(businessVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(String token, BusinessVO businessVO) {
|
||||
saveReturnId(token, businessVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(BusinessVO businessVO) {
|
||||
return saveReturnId(null, businessVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(String token, BusinessVO businessVO) {
|
||||
String businessId = UUIDUtil.getUUID();
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(businessVO);
|
||||
params.put("businessId", businessId);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setSaveInfo(params);
|
||||
} else {
|
||||
setAppSaveInfo(token, params);
|
||||
}
|
||||
businessDao.save(params);
|
||||
return businessId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(List<String> ids) {
|
||||
remove(null, ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(String token, List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("businessIds", ids);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
businessDao.remove(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("businessIds", ids);
|
||||
businessDao.delete(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String businessId, BusinessVO businessVO) {
|
||||
update(null, businessId, businessVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String token, String businessId, BusinessVO businessVO) {
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(businessVO);
|
||||
params.put("businessId", businessId);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
businessDao.update(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessDTO get(Map<String, Object> params) {
|
||||
return businessDao.get(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessDTO get(String businessId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("businessId", businessId);
|
||||
return get(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessBO getBO(Map<String, Object> params) {
|
||||
return businessDao.getBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessBO getBO(String businessId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("businessId", businessId);
|
||||
return getBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessPO getPO(Map<String, Object> params) {
|
||||
return businessDao.getPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessPO getPO(String businessId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("businessId", businessId);
|
||||
return getPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessDTO> list(Map<String, Object> params) {
|
||||
return businessDao.list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessBO> listBO(Map<String, Object> params) {
|
||||
return businessDao.listBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessPO> listPO(Map<String, Object> params) {
|
||||
return businessDao.listPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<BusinessDTO>> listPage(ListPage page) {
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<BusinessDTO> businessDTOs = list(page.getParams());
|
||||
PageInfo<BusinessDTO> pageInfo = new PageInfo<>(businessDTOs);
|
||||
return new SuccessResultList<>(businessDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer count(Map<String, Object> params) {
|
||||
Integer count = businessDao.count(params);
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,188 @@
|
||||
package cn.com.tenlion.usercenter.service.businessuser;
|
||||
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.businessuser.BusinessUserDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.businessuser.BusinessUserVO;
|
||||
import cn.com.tenlion.usercenter.pojo.bos.businessuser.BusinessUserBO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.businessuser.BusinessUserPO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: IBusinessUserService
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
public interface IBusinessUserService {
|
||||
|
||||
/**
|
||||
* 新增业务用户
|
||||
*
|
||||
* @param businessUserVO
|
||||
* @return
|
||||
*/
|
||||
void save(BusinessUserVO businessUserVO);
|
||||
|
||||
/**
|
||||
* 新增业务用户
|
||||
*
|
||||
* @param token
|
||||
* @param businessUserVO
|
||||
* @return
|
||||
*/
|
||||
void save(String token, BusinessUserVO businessUserVO);
|
||||
|
||||
/**
|
||||
* 新增业务用户
|
||||
*
|
||||
* @param businessUserVO
|
||||
* @return businessUserId
|
||||
*/
|
||||
String saveReturnId(BusinessUserVO businessUserVO);
|
||||
|
||||
/**
|
||||
* 新增业务用户
|
||||
*
|
||||
* @param token
|
||||
* @param businessUserVO
|
||||
* @return businessUserId
|
||||
*/
|
||||
String saveReturnId(String token, BusinessUserVO businessUserVO);
|
||||
|
||||
/**
|
||||
* 删除业务用户
|
||||
*
|
||||
* @param ids id列表
|
||||
* @return
|
||||
*/
|
||||
void remove(List<String> ids);
|
||||
|
||||
|
||||
/**
|
||||
* 删除业务用户
|
||||
*
|
||||
* @param token
|
||||
* @param ids id列表
|
||||
* @return
|
||||
*/
|
||||
void remove(String token, List<String> ids);
|
||||
|
||||
/**
|
||||
* 删除业务用户(物理删除)
|
||||
*
|
||||
* @param ids id列表
|
||||
*/
|
||||
void delete(List<String> ids);
|
||||
|
||||
/**
|
||||
* 修改业务用户
|
||||
*
|
||||
* @param businessUserId
|
||||
* @param businessUserVO
|
||||
* @return
|
||||
*/
|
||||
void update(String businessUserId, BusinessUserVO businessUserVO);
|
||||
|
||||
/**
|
||||
* 修改业务用户
|
||||
*
|
||||
* @param token
|
||||
* @param businessUserId
|
||||
* @param businessUserVO
|
||||
* @return
|
||||
*/
|
||||
void update(String token, String businessUserId, BusinessUserVO businessUserVO);
|
||||
|
||||
/**
|
||||
* 业务用户详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
BusinessUserDTO get(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务用户详情
|
||||
*
|
||||
* @param businessUserId
|
||||
* @return
|
||||
*/
|
||||
BusinessUserDTO get(String businessUserId);
|
||||
|
||||
/**
|
||||
* 业务用户详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
BusinessUserBO getBO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务用户详情
|
||||
*
|
||||
* @param businessUserId
|
||||
* @return
|
||||
*/
|
||||
BusinessUserBO getBO(String businessUserId);
|
||||
|
||||
/**
|
||||
* 业务用户详情
|
||||
*
|
||||
* @param params 参数Map
|
||||
* @return
|
||||
*/
|
||||
BusinessUserPO getPO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务用户详情
|
||||
*
|
||||
* @param businessUserId
|
||||
* @return
|
||||
*/
|
||||
BusinessUserPO getPO(String businessUserId);
|
||||
|
||||
/**
|
||||
* 业务用户列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<BusinessUserDTO> list(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务用户列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<BusinessUserBO> listBO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务用户列表
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
List<BusinessUserPO> listPO(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 业务用户分页列表
|
||||
*
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
SuccessResultList<List<BusinessUserDTO>> listPage(ListPage page);
|
||||
|
||||
/**
|
||||
* 业务用户统计
|
||||
*
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
package cn.com.tenlion.usercenter.service.businessuser.impl;
|
||||
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import cn.com.tenlion.usercenter.dao.businessuser.IBusinessUserDao;
|
||||
import cn.com.tenlion.usercenter.pojo.dtos.businessuser.BusinessUserDTO;
|
||||
import cn.com.tenlion.usercenter.pojo.vos.businessuser.BusinessUserVO;
|
||||
import cn.com.tenlion.usercenter.pojo.bos.businessuser.BusinessUserBO;
|
||||
import cn.com.tenlion.usercenter.pojo.pos.businessuser.BusinessUserPO;
|
||||
import cn.com.tenlion.usercenter.service.businessuser.IBusinessUserService;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName: BusinessUserServiceImpl
|
||||
* @Description: 业务用户
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2021-11-03 21:34:19
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Service
|
||||
public class BusinessUserServiceImpl extends DefaultBaseService implements IBusinessUserService {
|
||||
|
||||
@Autowired
|
||||
private IBusinessUserDao businessUserDao;
|
||||
|
||||
@Override
|
||||
public void save(BusinessUserVO businessUserVO) {
|
||||
saveReturnId(businessUserVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(String token, BusinessUserVO businessUserVO) {
|
||||
saveReturnId(token, businessUserVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(BusinessUserVO businessUserVO) {
|
||||
return saveReturnId(null, businessUserVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(String token, BusinessUserVO businessUserVO) {
|
||||
String businessUserId = UUIDUtil.getUUID();
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(businessUserVO);
|
||||
params.put("businessUserId", businessUserId);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setSaveInfo(params);
|
||||
} else {
|
||||
setAppSaveInfo(token, params);
|
||||
}
|
||||
businessUserDao.save(params);
|
||||
return businessUserId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(List<String> ids) {
|
||||
remove(null, ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(String token, List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("businessUserIds", ids);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
businessUserDao.remove(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(List<String> ids) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("businessUserIds", ids);
|
||||
businessUserDao.delete(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String businessUserId, BusinessUserVO businessUserVO) {
|
||||
update(null, businessUserId, businessUserVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(String token, String businessUserId, BusinessUserVO businessUserVO) {
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(businessUserVO);
|
||||
params.put("businessUserId", businessUserId);
|
||||
if (StringUtils.isBlank(token)) {
|
||||
setUpdateInfo(params);
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
businessUserDao.update(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessUserDTO get(Map<String, Object> params) {
|
||||
return businessUserDao.get(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessUserDTO get(String businessUserId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("businessUserId", businessUserId);
|
||||
return get(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessUserBO getBO(Map<String, Object> params) {
|
||||
return businessUserDao.getBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessUserBO getBO(String businessUserId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("businessUserId", businessUserId);
|
||||
return getBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessUserPO getPO(Map<String, Object> params) {
|
||||
return businessUserDao.getPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusinessUserPO getPO(String businessUserId) {
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("businessUserId", businessUserId);
|
||||
return getPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessUserDTO> list(Map<String, Object> params) {
|
||||
return businessUserDao.list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessUserBO> listBO(Map<String, Object> params) {
|
||||
return businessUserDao.listBO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BusinessUserPO> listPO(Map<String, Object> params) {
|
||||
return businessUserDao.listPO(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuccessResultList<List<BusinessUserDTO>> listPage(ListPage page) {
|
||||
PageHelper.startPage(page.getPage(), page.getRows());
|
||||
List<BusinessUserDTO> businessUserDTOs = list(page.getParams());
|
||||
PageInfo<BusinessUserDTO> pageInfo = new PageInfo<>(businessUserDTOs);
|
||||
return new SuccessResultList<>(businessUserDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer count(Map<String, Object> params) {
|
||||
Integer count = businessUserDao.count(params);
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user