链接新增bug 修复

This commit is contained in:
yuezhihang
2021-07-22 10:26:09 +08:00
parent b20e1480e3
commit 2783e02b1e
5 changed files with 10 additions and 5 deletions
@@ -19,6 +19,7 @@ public class ActDefineStartMap {
map.put("3","standardCommentProcessWorkFlow");
map.put("4","standardregulatoryinventory");
map.put("5","projectEvaluationProcess");
map.put("6","Projectcomplianceassessment");
map.put("8","nonConformanceRectificationKey");
@@ -51,8 +51,12 @@ public class TsUrlController{
@ApiOperation(value="第三方链接-添加", notes="第三方链接-添加")
@PostMapping(value = "/add")
public ResponseMessage<?> add(@RequestBody TsUrl tsUrl) {
int orderBy=tsUrlService.getMaxOrderBy();
tsUrl.setOrderBy(orderBy+1);
String orderBy=tsUrlService.getMaxOrderBy();
if (null!=orderBy) {
tsUrl.setOrderBy(Integer.valueOf(orderBy) + 1);
}else {
tsUrl.setOrderBy(1);
}
tsUrlService.save(tsUrl);
return Result.success();
}
@@ -18,5 +18,5 @@ public interface TsUrlDao extends BaseMapper<TsUrl> {
* @return int
*/
@Select("select max(order_by) from ts_url")
int getMaxOrderBy();
String getMaxOrderBy();
}
@@ -20,7 +20,7 @@ public interface ITsUrlService extends IService<TsUrl> {
* 获取最大排序号
* @return int
*/
int getMaxOrderBy();
String getMaxOrderBy();
/**
* 排序
@@ -31,7 +31,7 @@ public class TsUrlServiceImpl extends ServiceImpl<TsUrlDao, TsUrl> implements IT
* @return int
*/
@Override
public int getMaxOrderBy() {
public String getMaxOrderBy() {
return tsUrlDao.getMaxOrderBy();
}