|
@@ -55,11 +55,13 @@ public class TaOrgController extends BaseController {
|
55
|
55
|
@RequestMapping(value="/h5/org",method= RequestMethod.GET)
|
56
|
56
|
@ApiOperation(value="客户端列表", notes = "客户端列表", httpMethod = "GET", response = ResponseBean.class)
|
57
|
57
|
public ResponseBean taOrgList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
58
|
|
- @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception{
|
|
58
|
+ @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
|
59
|
+ @ApiParam("企业名称") @RequestParam(value ="orgName", required = false) String orgName) throws Exception{
|
59
|
60
|
|
60
|
61
|
IPage<TaOrg> pg = new Page<>(pageNum, pageSize);
|
61
|
62
|
QueryWrapper<TaOrg> queryWrapper = new QueryWrapper<>();
|
62
|
63
|
queryWrapper.eq("status", Constants.STATUS_NORMAL);
|
|
64
|
+ queryWrapper.like(!StringUtils.isEmpty(orgName), "org_name", "%" + orgName + "%");
|
63
|
65
|
queryWrapper.orderByDesc("org_name");
|
64
|
66
|
queryWrapper.orderByDesc("create_date");
|
65
|
67
|
|
|
@@ -77,11 +79,11 @@ public class TaOrgController extends BaseController {
|
77
|
79
|
@ApiOperation(value="管理端列表", notes = "管理端列表", httpMethod = "GET", response = ResponseBean.class)
|
78
|
80
|
public ResponseBean getList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
|
79
|
81
|
@ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
|
80
|
|
- @ApiParam("机构名称") @RequestParam(value ="orgName", required = false) String orgName) throws Exception{
|
|
82
|
+ @ApiParam("企业名称") @RequestParam(value ="orgName", required = false) String orgName) throws Exception{
|
81
|
83
|
|
82
|
84
|
IPage<TaOrg> pg = new Page<>(pageNum, pageSize);
|
83
|
85
|
QueryWrapper<TaOrg> queryWrapper = new QueryWrapper<>();
|
84
|
|
- queryWrapper.like(StringUtils.isEmpty(orgName), "org_name", "%" + orgName + "%");
|
|
86
|
+ queryWrapper.like(!StringUtils.isEmpty(orgName), "org_name", "%" + orgName + "%");
|
85
|
87
|
queryWrapper.gt("status", Constants.STATUS_DELETE);
|
86
|
88
|
queryWrapper.orderByDesc("create_date");
|
87
|
89
|
|
|
@@ -108,6 +110,9 @@ public class TaOrgController extends BaseController {
|
108
|
110
|
}
|
109
|
111
|
|
110
|
112
|
taOrg.setOrgId(null);
|
|
113
|
+ if (null == taOrg.getStatus()) {
|
|
114
|
+ taOrg.setStatus(Constants.STATUS_NORMAL);
|
|
115
|
+ }
|
111
|
116
|
|
112
|
117
|
if (iTaOrgService.save(taOrg)){
|
113
|
118
|
return ResponseBean.success(taOrg);
|
|
@@ -120,7 +125,7 @@ public class TaOrgController extends BaseController {
|
120
|
125
|
* 根据id删除对象
|
121
|
126
|
* @param id 实体ID
|
122
|
127
|
*/
|
123
|
|
- @RequestMapping(value="/admin/orgId/{id}", method= RequestMethod.DELETE)
|
|
128
|
+ @RequestMapping(value="/admin/org/{id}", method= RequestMethod.DELETE)
|
124
|
129
|
@ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
|
125
|
130
|
public ResponseBean taOrgDelete(@ApiParam("对象ID") @PathVariable String id) throws Exception{
|
126
|
131
|
|
|
@@ -148,7 +153,7 @@ public class TaOrgController extends BaseController {
|
148
|
153
|
* @param taOrg 实体对象
|
149
|
154
|
* @return
|
150
|
155
|
*/
|
151
|
|
- @RequestMapping(value="/admin/orgId/{id}",method= RequestMethod.PUT)
|
|
156
|
+ @RequestMapping(value="/admin/org/{id}",method= RequestMethod.PUT)
|
152
|
157
|
@ApiOperation(value="更新", notes = "更新", httpMethod = "PUT", response = ResponseBean.class)
|
153
|
158
|
public ResponseBean taOrgUpdate(@ApiParam("对象ID") @PathVariable String id,
|
154
|
159
|
@ApiParam("更新内容") @RequestBody TaOrg taOrg) throws Exception{
|
|
@@ -179,7 +184,7 @@ public class TaOrgController extends BaseController {
|
179
|
184
|
* 根据id查询对象
|
180
|
185
|
* @param id 实体ID
|
181
|
186
|
*/
|
182
|
|
- @RequestMapping(value="/admin/taOrg/{id}",method= RequestMethod.GET)
|
|
187
|
+ @RequestMapping(value="/admin/org/{id}",method= RequestMethod.GET)
|
183
|
188
|
@ApiOperation(value="详情", notes = "详情", httpMethod = "GET", response = ResponseBean.class)
|
184
|
189
|
public ResponseBean taOrgGet(@ApiParam("对象ID") @PathVariable String id) throws Exception{
|
185
|
190
|
TaOrg taOrg = iTaOrgService.getById(id);
|