Commit df11e6ea authored by 赵啸非's avatar 赵啸非

修改配置文件

parent 65e67146
......@@ -28,14 +28,8 @@ CREATE TABLE `mortals_ent_life_matter`
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID,主键,自增长',
`life_cycle_id` bigint(20) DEFAULT NULL COMMENT '企业生命周期id',
`life_cycle_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生命周期名称',
`matter_id` bigint(20) DEFAULT NULL COMMENT '事项id',
`matter_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事项名称',
`matter_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事项编码',
`area_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区域编码',
`area_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区域名称',
`area_level` tinyint(2) NULL DEFAULT 1 COMMENT '区域等级(1.省,2.地市州,3.区县,4.街道,5.社区)',
`dept_id` bigint(20) NULL DEFAULT NULL COMMENT '办理单位ID',
`dept_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '办理单位名称',
`matter_group_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '事项组名称',
`dept_id` bigint(20) NULL DEFAULT NULL COMMENT '办理单位数量',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建用户',
`create_user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建用户名称',
......@@ -63,6 +57,7 @@ CREATE TABLE `mortals_ent_life_matter_sub`
`area_level` tinyint(2) NULL DEFAULT 1 COMMENT '区域等级(1.省,2.地市州,3.区县,4.街道,5.社区)',
`dept_id` bigint(20) NULL DEFAULT NULL COMMENT '办理单位ID',
`dept_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '办理单位名称',
`sort` int(4) NULL DEFAULT 0 COMMENT '排序字段',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注',
`create_user_id` bigint(20) DEFAULT NULL COMMENT '创建用户',
`create_user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建用户名称',
......
......@@ -105,11 +105,10 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
Claims claims = parseToken(token);
String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY);
String userKey = getTokenKey(uuid);
String userStr = cacheService.get(userKey);
//cacheService.select(portalDb);
// String userStr = cacheService.get(userKey);
/* RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb);
String userStr =redisTemplate.opsForValue().get(userKey);*/
RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb);
String userStr =redisTemplate.opsForValue().get(userKey);
//刷新token时间
UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class);
......
package com.mortals.xhx.base.login;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest;
import com.mortals.framework.service.IAuthTokenService;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.login.web.LoginForm;
import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.base.system.resource.service.ResourceService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.common.pdu.user.LoginPdu;
import com.mortals.xhx.common.utils.MenuEncodeUtil;
import com.mortals.xhx.feign.site.ISiteFeign;
import com.mortals.xhx.feign.user.IUserFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Set;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED;
import static com.mortals.xhx.common.key.ErrorCode.ERROR_TOKEN_EXPIRED_CONTENT;
@RestController
@Slf4j
@RequestMapping("login")
public class LoginController extends BaseCRUDJsonBodyMappingController<UserService, UserEntity, Long> implements InitializingBean {
@Autowired
private ResourceService resourceService;
@Autowired
private MenuService menuService;
@Autowired
private ICacheService cacheService;
@Autowired
private IAuthTokenService authTokenService;
@Autowired
private IUserFeign userFeign;
@Autowired
private ISiteFeign siteFeign;
@RequestMapping("login")
public String login(@RequestBody LoginForm loginForm) throws Exception {
String loginName = loginForm.getLoginName();
String password = loginForm.getPassword();
LoginPdu loginPdu = new LoginPdu();
loginPdu.setLoginName(loginName);
loginPdu.setPassword(password);
loginPdu.setSecurityCode("admin");
String resp = userFeign.portalLogin(loginPdu);
return resp;
}
@RequestMapping("logout")
public void logout(HttpServletRequest request, HttpServletResponse response) throws Exception {
recordSysLog(request, "退出登录");
super.removeCurrUser(request);
}
@RequestMapping("index")
public String index() throws Exception {
JSONObject ret = new JSONObject();
IUser user = this.getCurUser();
if (user == null) {
return JSONObject.toJSONString(Rest.fail(ERROR_TOKEN_EXPIRED, ERROR_TOKEN_EXPIRED_CONTENT));
}
Set<String> urls = resourceService.findUrlSetByUserId(user.getId());
log.info("userId:{},urls:{}", user.getId(), JSON.toJSONString(urls));
// List<MenuEntity> outlookBarList = menuService.findTreeMenu(user, urls);
List<MenuEntity> treeMenuList = menuService.findTreeMenu(user);
String currUserName = user.getRealName();
if (currUserName == null || currUserName.trim().length() == 0) {
currUserName = "管理员";
}
JSONObject data = new JSONObject();
String token = authTokenService.getToken(request);
data.put("token", token);
data.put("currUserName", currUserName);
data.put("menuList", treeMenuList);
data.put("id", user.getId());
data.put("userType", user.getUserType());
ret.put(KEY_RESULT_DATA, data);
cacheService.hset(RedisKey.KEY_USER_MENU_CACHE, user.getId().toString(), MenuEncodeUtil.generateMenuUrlCode(urls));
ret.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
ret.put(KEY_RESULT_MSG, "用户登录系统成功!");
ret.put("resources", urls);
return ret.toJSONString();
}
@Override
public void afterPropertiesSet() throws Exception {
log.info("初始化加载登录。。。");
}
}
package com.mortals.xhx.base.login.interceptor;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.xhx.base.framework.config.InterceptorConfig;
import com.mortals.framework.ap.CookieService;
import com.mortals.framework.ap.SysConstains;
import com.mortals.framework.model.CookieInfo;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.util.AESUtil;
import com.mortals.framework.util.HttpUtil;
import com.mortals.framework.util.StringUtils;
import com.mortals.framework.web.interceptor.BaseInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;
@Order(1)
//@Component
public class AuthJsonInterceptor extends BaseInterceptor {
@Autowired
private InterceptorConfig config;
@Autowired
private ICacheService cacheService;
@Override
public int getOrder() {
return Integer.MAX_VALUE - 9;
}
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
try {
HandlerMethod handlerMethod = (HandlerMethod) handler;
Method method = handlerMethod.getMethod();
UnAuth annotation = method.getAnnotation(UnAuth.class);
if (annotation != null) {
//取消校验
return true;
}
String uri = request.getServletPath();
if (config.needCheckAuth(uri)) {
boolean auth = this.checkAuth(request, uri, config.getSecurityKey());
if (!auth) {
CookieInfo cookie = CookieService.getLoginCookie(request, config.getSecurityKey());
if (cookie == null || cookie.getUser() == null) {
writeJsonResponse(response, HttpServletResponse.SC_FORBIDDEN, "用户未登录或登录失效,请重新登录");
return false;
} else if (cookie.getUser().isAdmin()) {
return super.preHandle(request, response, handler);
} else {
writeJsonResponse(response, HttpServletResponse.SC_UNAUTHORIZED, "用户无该操作权限");
return false;
}
}
}
} catch (Exception e) {
logger.error("权限校验拦截请求处理异常-->" + e.getMessage());
writeJsonResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "用户权限校验异常");
return false;
}
return super.preHandle(request, response, handler);
}
private boolean checkAuth(HttpServletRequest request, String requestUrl, String securityKey) throws Exception {
int code = requestUrl.hashCode() & (Integer.MAX_VALUE - 1);
String cacheKey = HttpUtil.getCookieValue(request, SysConstains.COOKIE_MENU);
if (StringUtils.isEmpty(cacheKey)) {
return false;
}
String menuUrl = cacheService.get(cacheKey);
if (StringUtils.isEmpty(menuUrl)) {
return false;
}
menuUrl = AESUtil.decrypt(menuUrl, securityKey);
String codes = "," + menuUrl + ",";
String codeKey = "," + code + ",";
if (codes.indexOf(codeKey) != -1) {
return true;
}
return false;
}
}
package com.mortals.xhx.base.login.interceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.xhx.base.framework.config.InterceptorConfig;
import org.springframework.beans.factory.annotation.Autowired;
import com.mortals.framework.ap.CookieService;
import com.mortals.framework.model.CookieInfo;
import com.mortals.framework.service.ITokenService;
import com.mortals.framework.web.interceptor.BaseInterceptor;
//@Component
public class LoginJsonInterceptor extends BaseInterceptor {
@Autowired(required = false)
private ITokenService tokenService;
@Autowired
private InterceptorConfig config;
@Override
public int getOrder() {
return Integer.MAX_VALUE - 10;
}
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
try {
String uri = request.getServletPath();
if (config.needCheckAuth(uri)) {
CookieInfo cookie = CookieService.getLoginCookie(request, config.getSecurityKey());
boolean expire = true;
try {
if (cookie == null || cookie.getUser() == null
|| (cookie != null && tokenService != null && tokenService.isExpireToken(cookie))) {
expire = true;
} else {
expire = false;
}
} catch (Exception e) {
logger.warn("校验cookie是否过期异常-->原因:" + e.getMessage());
}
// 判断用户是否登录
if (expire) {
CookieService.deleteLoginCookie(request, response);
writeJsonResponse(response, HttpServletResponse.SC_FORBIDDEN, "用户未登录或登录失效,请重新登录111333");
return false;
}
}
} catch (Exception e) {
logger.error("登录校验拦截请求处理异常-->" + e.getMessage());
writeJsonResponse(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "用户登录校验异常");
return false;
}
return super.preHandle(request, response, handler);
}
}
......@@ -12,11 +12,11 @@ import com.mortals.xhx.module.ent.model.vo.EntLifeMatterVo;
import com.mortals.xhx.module.ent.model.EntLifeMatterSubEntity;
import lombok.Data;
/**
* 企业周期事项主实体对象
*
* @author zxfei
* @date 2025-03-15
*/
* 企业周期事项主实体对象
*
* @author zxfei
* @date 2025-03-17
*/
@Data
public class EntLifeMatterEntity extends EntLifeMatterVo {
private static final long serialVersionUID = 1L;
......@@ -30,38 +30,10 @@ public class EntLifeMatterEntity extends EntLifeMatterVo {
*/
private String lifeCycleName;
/**
* 事项id
*/
private Long matterId;
/**
* 事项名称
*/
private String matterName;
/**
* 事项编码
*/
private String matterCode;
/**
* 区域编码
*/
private String areaCode;
/**
* 区域名称
*/
private String areaName;
/**
* 区域等级(1.省,2.地市州,3.区县,4.街道,5.社区)
*/
private Integer areaLevel;
/**
* 办理单位ID
*/
private Long deptId;
/**
* 办理单位名称
*/
private String deptName;
/**
* 备注
*/
private String remark;
......@@ -69,6 +41,10 @@ public class EntLifeMatterEntity extends EntLifeMatterVo {
* 创建用户名称
*/
private String createUserName;
/**
* 事项组名称
*/
private String matterGroupName;
/**
* 企业周期事项子信息
*/
......@@ -99,15 +75,9 @@ public class EntLifeMatterEntity extends EntLifeMatterVo {
public void initAttrValue(){
this.lifeCycleId = null;
this.lifeCycleName = "";
this.matterId = null;
this.matterName = "";
this.matterCode = "";
this.areaCode = "";
this.areaName = "";
this.areaLevel = 1;
this.deptId = null;
this.deptName = "";
this.remark = "";
this.createUserName = "";
this.matterGroupName = "";
}
}
\ No newline at end of file
......@@ -10,11 +10,11 @@ import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.ent.model.vo.EntLifeMatterSubVo;
import lombok.Data;
/**
* 企业周期事项子实体对象
*
* @author zxfei
* @date 2025-03-15
*/
* 企业周期事项子实体对象
*
* @author zxfei
* @date 2025-03-17
*/
@Data
public class EntLifeMatterSubEntity extends EntLifeMatterSubVo {
private static final long serialVersionUID = 1L;
......@@ -63,6 +63,10 @@ public class EntLifeMatterSubEntity extends EntLifeMatterSubVo {
* 创建用户名称
*/
private String createUserName;
/**
* 排序字段
*/
private Integer sort;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -91,5 +95,6 @@ public class EntLifeMatterSubEntity extends EntLifeMatterSubVo {
this.deptName = "";
this.remark = "";
this.createUserName = "";
this.sort = 0;
}
}
\ No newline at end of file
......@@ -3,11 +3,11 @@ package com.mortals.xhx.module.ent.model;
import java.util.List;
import com.mortals.xhx.module.ent.model.EntLifeMatterSubEntity;
/**
* 企业周期事项子查询对象
*
* @author zxfei
* @date 2025-03-15
*/
* 企业周期事项子查询对象
*
* @author zxfei
* @date 2025-03-17
*/
public class EntLifeMatterSubQuery extends EntLifeMatterSubEntity {
/** 开始 主键ID,主键,自增长 */
private Long idStart;
......@@ -146,6 +146,21 @@ public class EntLifeMatterSubQuery extends EntLifeMatterSubEntity {
/** 结束 更新时间 */
private String updateTimeEnd;
/** 开始 排序字段 */
private Integer sortStart;
/** 结束 排序字段 */
private Integer sortEnd;
/** 增加 排序字段 */
private Integer sortIncrement;
/** 排序字段列表 */
private List <Integer> sortList;
/** 排序字段排除列表 */
private List <Integer> sortNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<EntLifeMatterSubQuery> orConditionList;
......@@ -928,6 +943,87 @@ public class EntLifeMatterSubQuery extends EntLifeMatterSubEntity {
this.updateTimeEnd = updateTimeEnd;
}
/**
* 获取 开始 排序字段
* @return sortStart
*/
public Integer getSortStart(){
return this.sortStart;
}
/**
* 设置 开始 排序字段
* @param sortStart
*/
public void setSortStart(Integer sortStart){
this.sortStart = sortStart;
}
/**
* 获取 结束 排序字段
* @return $sortEnd
*/
public Integer getSortEnd(){
return this.sortEnd;
}
/**
* 设置 结束 排序字段
* @param sortEnd
*/
public void setSortEnd(Integer sortEnd){
this.sortEnd = sortEnd;
}
/**
* 获取 增加 排序字段
* @return sortIncrement
*/
public Integer getSortIncrement(){
return this.sortIncrement;
}
/**
* 设置 增加 排序字段
* @param sortIncrement
*/
public void setSortIncrement(Integer sortIncrement){
this.sortIncrement = sortIncrement;
}
/**
* 获取 排序字段
* @return sortList
*/
public List<Integer> getSortList(){
return this.sortList;
}
/**
* 设置 排序字段
* @param sortList
*/
public void setSortList(List<Integer> sortList){
this.sortList = sortList;
}
/**
* 获取 排序字段
* @return sortNotList
*/
public List<Integer> getSortNotList(){
return this.sortNotList;
}
/**
* 设置 排序字段
* @param sortNotList
*/
public void setSortNotList(List<Integer> sortNotList){
this.sortNotList = sortNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
......@@ -1387,6 +1483,60 @@ public class EntLifeMatterSubQuery extends EntLifeMatterSubEntity {
/**
* 设置 排序字段
* @param sort
*/
public EntLifeMatterSubQuery sort(Integer sort){
setSort(sort);
return this;
}
/**
* 设置 开始 排序字段
* @param sortStart
*/
public EntLifeMatterSubQuery sortStart(Integer sortStart){
this.sortStart = sortStart;
return this;
}
/**
* 设置 结束 排序字段
* @param sortEnd
*/
public EntLifeMatterSubQuery sortEnd(Integer sortEnd){
this.sortEnd = sortEnd;
return this;
}
/**
* 设置 增加 排序字段
* @param sortIncrement
*/
public EntLifeMatterSubQuery sortIncrement(Integer sortIncrement){
this.sortIncrement = sortIncrement;
return this;
}
/**
* 设置 排序字段
* @param sortList
*/
public EntLifeMatterSubQuery sortList(List<Integer> sortList){
this.sortList = sortList;
return this;
}
/**
* 设置 排序字段
* @param sortNotList
*/
public EntLifeMatterSubQuery sortNotList(List<Integer> sortNotList){
this.sortNotList = sortNotList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.ent.dao.ibatis.EntLifeMatterSubDaoImpl">
<!-- 字段和属性映射 -->
......@@ -20,6 +20,7 @@
<result property="createUserName" column="create_user_name" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="sort" column="sort" />
</resultMap>
<!-- 表所有列 -->
......@@ -70,23 +71,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.update_time,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('sort') or colPickMode == 1 and data.containsKey('sort')))">
a.sort,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="EntLifeMatterSubEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_ent_life_matter_sub
(master_record_id,matter_id,matter_name,matter_code,area_code,area_name,area_level,dept_id,dept_name,remark,create_user_id,create_user_name,create_time,update_time)
(master_record_id,matter_id,matter_name,matter_code,area_code,area_name,area_level,dept_id,dept_name,remark,create_user_id,create_user_name,create_time,update_time,sort)
VALUES
(#{masterRecordId},#{matterId},#{matterName},#{matterCode},#{areaCode},#{areaName},#{areaLevel},#{deptId},#{deptName},#{remark},#{createUserId},#{createUserName},#{createTime},#{updateTime})
(#{masterRecordId},#{matterId},#{matterName},#{matterCode},#{areaCode},#{areaName},#{areaLevel},#{deptId},#{deptName},#{remark},#{createUserId},#{createUserName},#{createTime},#{updateTime},#{sort})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
insert into mortals_ent_life_matter_sub
(master_record_id,matter_id,matter_name,matter_code,area_code,area_name,area_level,dept_id,dept_name,remark,create_user_id,create_user_name,create_time,update_time)
(master_record_id,matter_id,matter_name,matter_code,area_code,area_name,area_level,dept_id,dept_name,remark,create_user_id,create_user_name,create_time,update_time,sort)
VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.masterRecordId},#{item.matterId},#{item.matterName},#{item.matterCode},#{item.areaCode},#{item.areaName},#{item.areaLevel},#{item.deptId},#{item.deptName},#{item.remark},#{item.createUserId},#{item.createUserName},#{item.createTime},#{item.updateTime})
(#{item.masterRecordId},#{item.matterId},#{item.matterName},#{item.matterCode},#{item.areaCode},#{item.areaName},#{item.areaLevel},#{item.deptId},#{item.deptName},#{item.remark},#{item.createUserId},#{item.createUserName},#{item.createTime},#{item.updateTime},#{item.sort})
</foreach>
</insert>
......@@ -153,6 +157,12 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.update_time=#{data.updateTime},
</if>
<if test="(colPickMode==0 and data.containsKey('sort')) or (colPickMode==1 and !data.containsKey('sort'))">
a.sort=#{data.sort},
</if>
<if test="(colPickMode==0 and data.containsKey('sortIncrement')) or (colPickMode==1 and !data.containsKey('sortIncrement'))">
a.sort=ifnull(a.sort,0) + #{data.sortIncrement},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -288,6 +298,18 @@
</if>
</foreach>
</trim>
<trim prefix="sort=(case" suffix="ELSE sort end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('sort')) or (colPickMode==1 and !item.containsKey('sort'))">
when a.id=#{item.id} then #{item.sort}
</when>
<when test="(colPickMode==0 and item.containsKey('sortIncrement')) or (colPickMode==1 and !item.containsKey('sortIncrement'))">
when a.id=#{item.id} then ifnull(a.sort,0) + #{item.sortIncrement}
</when>
</choose>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -747,6 +769,33 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.update_time <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if>
<if test="conditionParamRef.containsKey('sort')">
<if test="conditionParamRef.sort != null ">
${_conditionType_} a.sort = #{${_conditionParam_}.sort}
</if>
<if test="conditionParamRef.sort == null">
${_conditionType_} a.sort is null
</if>
</if>
<if test="conditionParamRef.containsKey('sortList') and conditionParamRef.sortList.size() > 0">
${_conditionType_} a.sort in
<foreach collection="conditionParamRef.sortList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sortNotList') and conditionParamRef.sortNotList.size() > 0">
${_conditionType_} a.sort not in
<foreach collection="conditionParamRef.sortNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('sortStart') and conditionParamRef.sortStart != null">
${_conditionType_} a.sort <![CDATA[ >= ]]> #{${_conditionParam_}.sortStart}
</if>
<if test="conditionParamRef.containsKey('sortEnd') and conditionParamRef.sortEnd != null">
${_conditionType_} a.sort <![CDATA[ <= ]]> #{${_conditionParam_}.sortEnd}
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -793,6 +842,13 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('sortList') and conditionParamRef.sortList.size() > 0">
field(a.sort,
<foreach collection="conditionParamRef.sortList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<foreach collection="orderColList" open="" close="" index="index" item="item" separator=",">
a.${item.colName} ${item.sortKind}
......@@ -843,6 +899,13 @@
</foreach>
,
</if>
<if test="conditionParamRef.containsKey('sortList') and conditionParamRef.sortList.size() > 0">
field(a.sort,
<foreach collection="conditionParamRef.sortList" open="" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
,
</if>
<trim suffixOverrides="," suffix="">
<if test="orderCol.containsKey('id')">
a.id
......@@ -919,6 +982,11 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('sort')">
a.sort
<if test='orderCol.sort != null and "DESC".equalsIgnoreCase(orderCol.sort)'>DESC</if>
,
</if>
</trim>
</if>
......
......@@ -15,6 +15,7 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
###企业生命周期列表
POST {{baseUrl}}/ent/life/cycle/list
Authorization: {{authToken}}
Content-Type: application/json
{
......@@ -33,7 +34,7 @@ Content-Type: application/json
"lifeCycleName":"tiaNvx",
"sort":0,
"remark":"tpsUjo",
"createUserName":"PrDtwb",
"createUserName":"PrDtwb"
}
> {%
......
......@@ -46,26 +46,6 @@ POST {{baseUrl}}/resource/refreshUrl
Accept: application/json
###测试json提交
POST {{baseUrl}}/test/getHcpSin/json
Content-Type: application/json
{"affairCode":"abcd1234ddddd"}
###针对某一接入
POST {{baseUrl}}/role/auth/editMenu
Authorization: {{authToken}}
Content-Type: application/json
{
"roleId": 2
}
###子区域更新
POST {{baseUrl}}/base/area/genSubAreaByAreaName
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment