19 changed files with 1809 additions and 1514 deletions
@ -0,0 +1,24 @@ |
|||||
|
package com.ccsens.ptccsens.annotation; |
||||
|
|
||||
|
import java.lang.annotation.*; |
||||
|
|
||||
|
/** |
||||
|
* @description: 用于标识方法需要登录,获取userId |
||||
|
* 如果未登录,直接返回用户未登录 |
||||
|
* @author: wuHuiJuan |
||||
|
* @create: 2019/12/09 09:48 |
||||
|
*/ |
||||
|
@Documented |
||||
|
@Retention(RetentionPolicy.RUNTIME) |
||||
|
@Target(ElementType.METHOD) |
||||
|
public @interface MustLogin { |
||||
|
/** |
||||
|
* -1 不处理 |
||||
|
* 0: 数组 |
||||
|
* 1:List |
||||
|
* 2:Set |
||||
|
* 3: Map |
||||
|
* */ |
||||
|
byte type() default -1; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,138 @@ |
|||||
|
package com.ccsens.ptccsens.aspect; |
||||
|
|
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import com.ccsens.ptccsens.annotation.MustLogin; |
||||
|
import com.ccsens.ptccsens.bean.po.ProUser; |
||||
|
import com.ccsens.ptccsens.persist.dao.UserDao; |
||||
|
import com.ccsens.ptccsens.util.Constant; |
||||
|
import com.ccsens.util.CodeEnum; |
||||
|
import com.ccsens.util.JsonResponse; |
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
import com.ccsensptos.tallsdk.bean.dto.TallTokenDto; |
||||
|
import com.ccsensptos.tallsdk.bean.vo.TallTokenVo; |
||||
|
import com.ccsensptos.tallsdk.util.TokenUtil; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.aspectj.lang.ProceedingJoinPoint; |
||||
|
import org.aspectj.lang.Signature; |
||||
|
import org.aspectj.lang.annotation.Around; |
||||
|
import org.aspectj.lang.annotation.Aspect; |
||||
|
import org.aspectj.lang.annotation.Pointcut; |
||||
|
import org.aspectj.lang.reflect.MethodSignature; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.core.annotation.Order; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
import org.springframework.web.context.request.RequestContextHolder; |
||||
|
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import java.lang.reflect.Array; |
||||
|
import java.lang.reflect.Method; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wuHuiJuan |
||||
|
* @create: 2019/12/09 09:54 |
||||
|
*/ |
||||
|
@Order(0) |
||||
|
@Slf4j |
||||
|
@Aspect |
||||
|
@Component |
||||
|
public class MustLoginAspect { |
||||
|
@Resource |
||||
|
private UserDao userDao; |
||||
|
|
||||
|
@Pointcut("@annotation(com.ccsens.ptccsens.annotation.MustLogin)") |
||||
|
public void loginAdvice(){} |
||||
|
|
||||
|
@Around("loginAdvice()") |
||||
|
public Object around(ProceedingJoinPoint pjp) throws Throwable { |
||||
|
|
||||
|
HttpServletRequest request = ((ServletRequestAttributes) |
||||
|
RequestContextHolder.getRequestAttributes()).getRequest(); |
||||
|
|
||||
|
final String authHeader = request.getHeader(WebConstant.HEADER_KEY_TOKEN); |
||||
|
|
||||
|
Object[] args = pjp.getArgs(); |
||||
|
QueryDto dto = args == null || args.length < 1 ? null : (QueryDto) args[0]; |
||||
|
|
||||
|
//获取userId
|
||||
|
ProUser user = null; |
||||
|
if(StrUtil.isNotEmpty(authHeader)){ |
||||
|
log.info("MustLogin————token:{}", authHeader); |
||||
|
//通过token查找用户信息
|
||||
|
//TODO 根据token获取用户信息
|
||||
|
TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(authHeader, Constant.APP_ID, Constant.APP_SECRET)); |
||||
|
if(ObjectUtil.isNull(userByToken)){ |
||||
|
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
||||
|
} |
||||
|
//通过手机号获取用户在服务内的userId
|
||||
|
if(StrUtil.isNotBlank(userByToken.getPhone())){ |
||||
|
user = userDao.getUserIdByPhone(userByToken.getPhone()); |
||||
|
log.info("{}获取user:{}", authHeader, user); |
||||
|
} |
||||
|
} |
||||
|
Signature signature = pjp.getSignature(); |
||||
|
MethodSignature methodSignature = (MethodSignature) signature; |
||||
|
Method targetMethod = methodSignature.getMethod(); |
||||
|
|
||||
|
MustLogin mustLoginAnnotation = targetMethod.getAnnotation(MustLogin.class); |
||||
|
fillSpecial(dto, mustLoginAnnotation); |
||||
|
|
||||
|
//必须登录,未登录直接返回未登录相关信息
|
||||
|
if (user == null) { |
||||
|
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
||||
|
} |
||||
|
// JSONObject json = JSONObject.parseObject(JSON.toJSONString(response.getData()));
|
||||
|
// Long userId = json.getLong("id");
|
||||
|
// String userName = json.getString("userName");
|
||||
|
// String avatarUrl = json.getString("avatarUrl");
|
||||
|
// String phone = json.getString("phone");
|
||||
|
// if (userId == null || userId == 0) {
|
||||
|
// return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
|
||||
|
// }
|
||||
|
|
||||
|
if (dto != null) { |
||||
|
dto.setUserId(user.getId()); |
||||
|
dto.setPhone(user.getPhone()); |
||||
|
} |
||||
|
|
||||
|
Object result = pjp.proceed(); |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
private void fillSpecial(QueryDto dto, MustLogin mustLoginAnnotation) { |
||||
|
if (mustLoginAnnotation == null) { |
||||
|
return; |
||||
|
} |
||||
|
if (dto != null && mustLoginAnnotation.type() > -1) { |
||||
|
switch (mustLoginAnnotation.type()) { |
||||
|
case 0: |
||||
|
Object obj = dto.getParam(); |
||||
|
if (obj!= null && !obj.getClass().isArray()) { |
||||
|
Class<?> aClass = dto.getParam().getClass(); |
||||
|
Object o = Array.newInstance(aClass, 1); |
||||
|
Array.set(o, 0, dto.getParam()); |
||||
|
dto.setParam(o); |
||||
|
} |
||||
|
break; |
||||
|
case 1: |
||||
|
Object obj1 = dto.getParam(); |
||||
|
if (obj1!= null && !(obj1 instanceof List)) { |
||||
|
ArrayList arrayList = new ArrayList(); |
||||
|
arrayList.add(dto.getParam()); |
||||
|
dto.setParam(arrayList); |
||||
|
} |
||||
|
break; |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -1,150 +1,172 @@ |
|||||
package com.ccsens.ptccsens.bean.po; |
package com.ccsens.ptccsens.bean.po; |
||||
|
|
||||
import java.io.Serializable; |
import java.io.Serializable; |
||||
import java.util.Date; |
import java.util.Date; |
||||
|
|
||||
public class ProTaskPlugin implements Serializable { |
public class ProTaskPlugin implements Serializable { |
||||
private Long id; |
private Long id; |
||||
|
|
||||
private String param; |
private String param; |
||||
|
|
||||
private Integer plginRow; |
private Integer plginRow; |
||||
|
|
||||
private Integer plginCol; |
private Integer plginCol; |
||||
|
|
||||
private Long taskDetailId; |
private Long taskDetailId; |
||||
|
|
||||
private Long pluginId; |
private Long pluginId; |
||||
|
|
||||
private Date createdAt; |
private Long businessPluginId; |
||||
|
|
||||
private Date updatedAt; |
private String code; |
||||
|
|
||||
private Byte recStatus; |
private Byte pluginInner; |
||||
|
|
||||
private Integer colspan; |
private Date createdAt; |
||||
|
|
||||
private Integer rowspan; |
private Date updatedAt; |
||||
|
|
||||
private String code; |
private Byte recStatus; |
||||
|
|
||||
private static final long serialVersionUID = 1L; |
private Integer colspan; |
||||
|
|
||||
public Long getId() { |
private Integer rowspan; |
||||
return id; |
|
||||
} |
private static final long serialVersionUID = 1L; |
||||
|
|
||||
public void setId(Long id) { |
public Long getId() { |
||||
this.id = id; |
return id; |
||||
} |
} |
||||
|
|
||||
public String getParam() { |
public void setId(Long id) { |
||||
return param; |
this.id = id; |
||||
} |
} |
||||
|
|
||||
public void setParam(String param) { |
public String getParam() { |
||||
this.param = param == null ? null : param.trim(); |
return param; |
||||
} |
} |
||||
|
|
||||
public Integer getPlginRow() { |
public void setParam(String param) { |
||||
return plginRow; |
this.param = param == null ? null : param.trim(); |
||||
} |
} |
||||
|
|
||||
public void setPlginRow(Integer plginRow) { |
public Integer getPlginRow() { |
||||
this.plginRow = plginRow; |
return plginRow; |
||||
} |
} |
||||
|
|
||||
public Integer getPlginCol() { |
public void setPlginRow(Integer plginRow) { |
||||
return plginCol; |
this.plginRow = plginRow; |
||||
} |
} |
||||
|
|
||||
public void setPlginCol(Integer plginCol) { |
public Integer getPlginCol() { |
||||
this.plginCol = plginCol; |
return plginCol; |
||||
} |
} |
||||
|
|
||||
public Long getTaskDetailId() { |
public void setPlginCol(Integer plginCol) { |
||||
return taskDetailId; |
this.plginCol = plginCol; |
||||
} |
} |
||||
|
|
||||
public void setTaskDetailId(Long taskDetailId) { |
public Long getTaskDetailId() { |
||||
this.taskDetailId = taskDetailId; |
return taskDetailId; |
||||
} |
} |
||||
|
|
||||
public Long getPluginId() { |
public void setTaskDetailId(Long taskDetailId) { |
||||
return pluginId; |
this.taskDetailId = taskDetailId; |
||||
} |
} |
||||
|
|
||||
public void setPluginId(Long pluginId) { |
public Long getPluginId() { |
||||
this.pluginId = pluginId; |
return pluginId; |
||||
} |
} |
||||
|
|
||||
public Date getCreatedAt() { |
public void setPluginId(Long pluginId) { |
||||
return createdAt; |
this.pluginId = pluginId; |
||||
} |
} |
||||
|
|
||||
public void setCreatedAt(Date createdAt) { |
public Long getBusinessPluginId() { |
||||
this.createdAt = createdAt; |
return businessPluginId; |
||||
} |
} |
||||
|
|
||||
public Date getUpdatedAt() { |
public void setBusinessPluginId(Long businessPluginId) { |
||||
return updatedAt; |
this.businessPluginId = businessPluginId; |
||||
} |
} |
||||
|
|
||||
public void setUpdatedAt(Date updatedAt) { |
public String getCode() { |
||||
this.updatedAt = updatedAt; |
return code; |
||||
} |
} |
||||
|
|
||||
public Byte getRecStatus() { |
public void setCode(String code) { |
||||
return recStatus; |
this.code = code == null ? null : code.trim(); |
||||
} |
} |
||||
|
|
||||
public void setRecStatus(Byte recStatus) { |
public Byte getPluginInner() { |
||||
this.recStatus = recStatus; |
return pluginInner; |
||||
} |
} |
||||
|
|
||||
public Integer getColspan() { |
public void setPluginInner(Byte pluginInner) { |
||||
return colspan; |
this.pluginInner = pluginInner; |
||||
} |
} |
||||
|
|
||||
public void setColspan(Integer colspan) { |
public Date getCreatedAt() { |
||||
this.colspan = colspan; |
return createdAt; |
||||
} |
} |
||||
|
|
||||
public Integer getRowspan() { |
public void setCreatedAt(Date createdAt) { |
||||
return rowspan; |
this.createdAt = createdAt; |
||||
} |
} |
||||
|
|
||||
public void setRowspan(Integer rowspan) { |
public Date getUpdatedAt() { |
||||
this.rowspan = rowspan; |
return updatedAt; |
||||
} |
} |
||||
|
|
||||
public String getCode() { |
public void setUpdatedAt(Date updatedAt) { |
||||
return code; |
this.updatedAt = updatedAt; |
||||
} |
} |
||||
|
|
||||
public void setCode(String code) { |
public Byte getRecStatus() { |
||||
this.code = code == null ? null : code.trim(); |
return recStatus; |
||||
} |
} |
||||
|
|
||||
@Override |
public void setRecStatus(Byte recStatus) { |
||||
public String toString() { |
this.recStatus = recStatus; |
||||
StringBuilder sb = new StringBuilder(); |
} |
||||
sb.append(getClass().getSimpleName()); |
|
||||
sb.append(" ["); |
public Integer getColspan() { |
||||
sb.append("Hash = ").append(hashCode()); |
return colspan; |
||||
sb.append(", id=").append(id); |
} |
||||
sb.append(", param=").append(param); |
|
||||
sb.append(", plginRow=").append(plginRow); |
public void setColspan(Integer colspan) { |
||||
sb.append(", plginCol=").append(plginCol); |
this.colspan = colspan; |
||||
sb.append(", taskDetailId=").append(taskDetailId); |
} |
||||
sb.append(", pluginId=").append(pluginId); |
|
||||
sb.append(", createdAt=").append(createdAt); |
public Integer getRowspan() { |
||||
sb.append(", updatedAt=").append(updatedAt); |
return rowspan; |
||||
sb.append(", recStatus=").append(recStatus); |
} |
||||
sb.append(", colspan=").append(colspan); |
|
||||
sb.append(", rowspan=").append(rowspan); |
public void setRowspan(Integer rowspan) { |
||||
sb.append(", code=").append(code); |
this.rowspan = rowspan; |
||||
sb.append("]"); |
} |
||||
return sb.toString(); |
|
||||
} |
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", param=").append(param); |
||||
|
sb.append(", plginRow=").append(plginRow); |
||||
|
sb.append(", plginCol=").append(plginCol); |
||||
|
sb.append(", taskDetailId=").append(taskDetailId); |
||||
|
sb.append(", pluginId=").append(pluginId); |
||||
|
sb.append(", businessPluginId=").append(businessPluginId); |
||||
|
sb.append(", code=").append(code); |
||||
|
sb.append(", pluginInner=").append(pluginInner); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append(", colspan=").append(colspan); |
||||
|
sb.append(", rowspan=").append(rowspan); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
} |
} |
||||
File diff suppressed because it is too large
@ -1,30 +1,30 @@ |
|||||
package com.ccsens.ptccsens.persist.mapper; |
package com.ccsens.ptccsens.persist.mapper; |
||||
|
|
||||
import com.ccsens.ptccsens.bean.po.ProTaskPlugin; |
import com.ccsens.ptccsens.bean.po.ProTaskPlugin; |
||||
import com.ccsens.ptccsens.bean.po.ProTaskPluginExample; |
import com.ccsens.ptccsens.bean.po.ProTaskPluginExample; |
||||
import java.util.List; |
import java.util.List; |
||||
import org.apache.ibatis.annotations.Param; |
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
public interface ProTaskPluginMapper { |
public interface ProTaskPluginMapper { |
||||
long countByExample(ProTaskPluginExample example); |
long countByExample(ProTaskPluginExample example); |
||||
|
|
||||
int deleteByExample(ProTaskPluginExample example); |
int deleteByExample(ProTaskPluginExample example); |
||||
|
|
||||
int deleteByPrimaryKey(Long id); |
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
int insert(ProTaskPlugin record); |
int insert(ProTaskPlugin record); |
||||
|
|
||||
int insertSelective(ProTaskPlugin record); |
int insertSelective(ProTaskPlugin record); |
||||
|
|
||||
List<ProTaskPlugin> selectByExample(ProTaskPluginExample example); |
List<ProTaskPlugin> selectByExample(ProTaskPluginExample example); |
||||
|
|
||||
ProTaskPlugin selectByPrimaryKey(Long id); |
ProTaskPlugin selectByPrimaryKey(Long id); |
||||
|
|
||||
int updateByExampleSelective(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example); |
int updateByExampleSelective(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example); |
||||
|
|
||||
int updateByExample(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example); |
int updateByExample(@Param("record") ProTaskPlugin record, @Param("example") ProTaskPluginExample example); |
||||
|
|
||||
int updateByPrimaryKeySelective(ProTaskPlugin record); |
int updateByPrimaryKeySelective(ProTaskPlugin record); |
||||
|
|
||||
int updateByPrimaryKey(ProTaskPlugin record); |
int updateByPrimaryKey(ProTaskPlugin record); |
||||
} |
} |
||||
@ -1,323 +1,353 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.ccsens.ptccsens.persist.mapper.ProTaskPluginMapper"> |
<mapper namespace="com.ccsens.ptccsens.persist.mapper.ProTaskPluginMapper"> |
||||
<resultMap id="BaseResultMap" type="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
<resultMap id="BaseResultMap" type="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
||||
<id column="id" jdbcType="BIGINT" property="id" /> |
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
<result column="param" jdbcType="VARCHAR" property="param" /> |
<result column="param" jdbcType="VARCHAR" property="param" /> |
||||
<result column="plgin_row" jdbcType="INTEGER" property="plginRow" /> |
<result column="plgin_row" jdbcType="INTEGER" property="plginRow" /> |
||||
<result column="plgin_col" jdbcType="INTEGER" property="plginCol" /> |
<result column="plgin_col" jdbcType="INTEGER" property="plginCol" /> |
||||
<result column="task_detail_id" jdbcType="BIGINT" property="taskDetailId" /> |
<result column="task_detail_id" jdbcType="BIGINT" property="taskDetailId" /> |
||||
<result column="plugin_id" jdbcType="BIGINT" property="pluginId" /> |
<result column="plugin_id" jdbcType="BIGINT" property="pluginId" /> |
||||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
<result column="business_plugin_id" jdbcType="BIGINT" property="businessPluginId" /> |
||||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
<result column="code" jdbcType="VARCHAR" property="code" /> |
||||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
<result column="plugin_inner" jdbcType="TINYINT" property="pluginInner" /> |
||||
<result column="colspan" jdbcType="INTEGER" property="colspan" /> |
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
||||
<result column="rowspan" jdbcType="INTEGER" property="rowspan" /> |
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
||||
<result column="code" jdbcType="VARCHAR" property="code" /> |
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
||||
</resultMap> |
<result column="colspan" jdbcType="INTEGER" property="colspan" /> |
||||
<sql id="Example_Where_Clause"> |
<result column="rowspan" jdbcType="INTEGER" property="rowspan" /> |
||||
<where> |
</resultMap> |
||||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
<sql id="Example_Where_Clause"> |
||||
<if test="criteria.valid"> |
<where> |
||||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
<foreach collection="criteria.criteria" item="criterion"> |
<if test="criteria.valid"> |
||||
<choose> |
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
<when test="criterion.noValue"> |
<foreach collection="criteria.criteria" item="criterion"> |
||||
and ${criterion.condition} |
<choose> |
||||
</when> |
<when test="criterion.noValue"> |
||||
<when test="criterion.singleValue"> |
and ${criterion.condition} |
||||
and ${criterion.condition} #{criterion.value} |
</when> |
||||
</when> |
<when test="criterion.singleValue"> |
||||
<when test="criterion.betweenValue"> |
and ${criterion.condition} #{criterion.value} |
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
</when> |
||||
</when> |
<when test="criterion.betweenValue"> |
||||
<when test="criterion.listValue"> |
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
and ${criterion.condition} |
</when> |
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
<when test="criterion.listValue"> |
||||
#{listItem} |
and ${criterion.condition} |
||||
</foreach> |
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
</when> |
#{listItem} |
||||
</choose> |
</foreach> |
||||
</foreach> |
</when> |
||||
</trim> |
</choose> |
||||
</if> |
</foreach> |
||||
</foreach> |
</trim> |
||||
</where> |
</if> |
||||
</sql> |
</foreach> |
||||
<sql id="Update_By_Example_Where_Clause"> |
</where> |
||||
<where> |
</sql> |
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
<sql id="Update_By_Example_Where_Clause"> |
||||
<if test="criteria.valid"> |
<where> |
||||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
<foreach collection="criteria.criteria" item="criterion"> |
<if test="criteria.valid"> |
||||
<choose> |
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
<when test="criterion.noValue"> |
<foreach collection="criteria.criteria" item="criterion"> |
||||
and ${criterion.condition} |
<choose> |
||||
</when> |
<when test="criterion.noValue"> |
||||
<when test="criterion.singleValue"> |
and ${criterion.condition} |
||||
and ${criterion.condition} #{criterion.value} |
</when> |
||||
</when> |
<when test="criterion.singleValue"> |
||||
<when test="criterion.betweenValue"> |
and ${criterion.condition} #{criterion.value} |
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
</when> |
||||
</when> |
<when test="criterion.betweenValue"> |
||||
<when test="criterion.listValue"> |
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
and ${criterion.condition} |
</when> |
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
<when test="criterion.listValue"> |
||||
#{listItem} |
and ${criterion.condition} |
||||
</foreach> |
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
</when> |
#{listItem} |
||||
</choose> |
</foreach> |
||||
</foreach> |
</when> |
||||
</trim> |
</choose> |
||||
</if> |
</foreach> |
||||
</foreach> |
</trim> |
||||
</where> |
</if> |
||||
</sql> |
</foreach> |
||||
<sql id="Base_Column_List"> |
</where> |
||||
id, param, plgin_row, plgin_col, task_detail_id, plugin_id, created_at, updated_at, |
</sql> |
||||
rec_status, colspan, rowspan, code |
<sql id="Base_Column_List"> |
||||
</sql> |
id, param, plgin_row, plgin_col, task_detail_id, plugin_id, business_plugin_id, code, |
||||
<select id="selectByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample" resultMap="BaseResultMap"> |
plugin_inner, created_at, updated_at, rec_status, colspan, rowspan |
||||
select |
</sql> |
||||
<if test="distinct"> |
<select id="selectByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample" resultMap="BaseResultMap"> |
||||
distinct |
select |
||||
</if> |
<if test="distinct"> |
||||
<include refid="Base_Column_List" /> |
distinct |
||||
from t_pro_task_plugin |
</if> |
||||
<if test="_parameter != null"> |
<include refid="Base_Column_List" /> |
||||
<include refid="Example_Where_Clause" /> |
from t_pro_task_plugin |
||||
</if> |
<if test="_parameter != null"> |
||||
<if test="orderByClause != null"> |
<include refid="Example_Where_Clause" /> |
||||
order by ${orderByClause} |
</if> |
||||
</if> |
<if test="orderByClause != null"> |
||||
</select> |
order by ${orderByClause} |
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
</if> |
||||
select |
</select> |
||||
<include refid="Base_Column_List" /> |
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
from t_pro_task_plugin |
select |
||||
where id = #{id,jdbcType=BIGINT} |
<include refid="Base_Column_List" /> |
||||
</select> |
from t_pro_task_plugin |
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
where id = #{id,jdbcType=BIGINT} |
||||
delete from t_pro_task_plugin |
</select> |
||||
where id = #{id,jdbcType=BIGINT} |
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
</delete> |
delete from t_pro_task_plugin |
||||
<delete id="deleteByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample"> |
where id = #{id,jdbcType=BIGINT} |
||||
delete from t_pro_task_plugin |
</delete> |
||||
<if test="_parameter != null"> |
<delete id="deleteByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample"> |
||||
<include refid="Example_Where_Clause" /> |
delete from t_pro_task_plugin |
||||
</if> |
<if test="_parameter != null"> |
||||
</delete> |
<include refid="Example_Where_Clause" /> |
||||
<insert id="insert" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
</if> |
||||
insert into t_pro_task_plugin (id, param, plgin_row, |
</delete> |
||||
plgin_col, task_detail_id, plugin_id, |
<insert id="insert" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
||||
created_at, updated_at, rec_status, |
insert into t_pro_task_plugin (id, param, plgin_row, |
||||
colspan, rowspan, code |
plgin_col, task_detail_id, plugin_id, |
||||
) |
business_plugin_id, code, plugin_inner, |
||||
values (#{id,jdbcType=BIGINT}, #{param,jdbcType=VARCHAR}, #{plginRow,jdbcType=INTEGER}, |
created_at, updated_at, rec_status, |
||||
#{plginCol,jdbcType=INTEGER}, #{taskDetailId,jdbcType=BIGINT}, #{pluginId,jdbcType=BIGINT}, |
colspan, rowspan) |
||||
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, |
values (#{id,jdbcType=BIGINT}, #{param,jdbcType=VARCHAR}, #{plginRow,jdbcType=INTEGER}, |
||||
#{colspan,jdbcType=INTEGER}, #{rowspan,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR} |
#{plginCol,jdbcType=INTEGER}, #{taskDetailId,jdbcType=BIGINT}, #{pluginId,jdbcType=BIGINT}, |
||||
) |
#{businessPluginId,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{pluginInner,jdbcType=TINYINT}, |
||||
</insert> |
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, |
||||
<insert id="insertSelective" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
#{colspan,jdbcType=INTEGER}, #{rowspan,jdbcType=INTEGER}) |
||||
insert into t_pro_task_plugin |
</insert> |
||||
<trim prefix="(" suffix=")" suffixOverrides=","> |
<insert id="insertSelective" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
||||
<if test="id != null"> |
insert into t_pro_task_plugin |
||||
id, |
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
</if> |
<if test="id != null"> |
||||
<if test="param != null"> |
id, |
||||
param, |
</if> |
||||
</if> |
<if test="param != null"> |
||||
<if test="plginRow != null"> |
param, |
||||
plgin_row, |
</if> |
||||
</if> |
<if test="plginRow != null"> |
||||
<if test="plginCol != null"> |
plgin_row, |
||||
plgin_col, |
</if> |
||||
</if> |
<if test="plginCol != null"> |
||||
<if test="taskDetailId != null"> |
plgin_col, |
||||
task_detail_id, |
</if> |
||||
</if> |
<if test="taskDetailId != null"> |
||||
<if test="pluginId != null"> |
task_detail_id, |
||||
plugin_id, |
</if> |
||||
</if> |
<if test="pluginId != null"> |
||||
<if test="createdAt != null"> |
plugin_id, |
||||
created_at, |
</if> |
||||
</if> |
<if test="businessPluginId != null"> |
||||
<if test="updatedAt != null"> |
business_plugin_id, |
||||
updated_at, |
</if> |
||||
</if> |
<if test="code != null"> |
||||
<if test="recStatus != null"> |
code, |
||||
rec_status, |
</if> |
||||
</if> |
<if test="pluginInner != null"> |
||||
<if test="colspan != null"> |
plugin_inner, |
||||
colspan, |
</if> |
||||
</if> |
<if test="createdAt != null"> |
||||
<if test="rowspan != null"> |
created_at, |
||||
rowspan, |
</if> |
||||
</if> |
<if test="updatedAt != null"> |
||||
<if test="code != null"> |
updated_at, |
||||
code, |
</if> |
||||
</if> |
<if test="recStatus != null"> |
||||
</trim> |
rec_status, |
||||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
</if> |
||||
<if test="id != null"> |
<if test="colspan != null"> |
||||
#{id,jdbcType=BIGINT}, |
colspan, |
||||
</if> |
</if> |
||||
<if test="param != null"> |
<if test="rowspan != null"> |
||||
#{param,jdbcType=VARCHAR}, |
rowspan, |
||||
</if> |
</if> |
||||
<if test="plginRow != null"> |
</trim> |
||||
#{plginRow,jdbcType=INTEGER}, |
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
</if> |
<if test="id != null"> |
||||
<if test="plginCol != null"> |
#{id,jdbcType=BIGINT}, |
||||
#{plginCol,jdbcType=INTEGER}, |
</if> |
||||
</if> |
<if test="param != null"> |
||||
<if test="taskDetailId != null"> |
#{param,jdbcType=VARCHAR}, |
||||
#{taskDetailId,jdbcType=BIGINT}, |
</if> |
||||
</if> |
<if test="plginRow != null"> |
||||
<if test="pluginId != null"> |
#{plginRow,jdbcType=INTEGER}, |
||||
#{pluginId,jdbcType=BIGINT}, |
</if> |
||||
</if> |
<if test="plginCol != null"> |
||||
<if test="createdAt != null"> |
#{plginCol,jdbcType=INTEGER}, |
||||
#{createdAt,jdbcType=TIMESTAMP}, |
</if> |
||||
</if> |
<if test="taskDetailId != null"> |
||||
<if test="updatedAt != null"> |
#{taskDetailId,jdbcType=BIGINT}, |
||||
#{updatedAt,jdbcType=TIMESTAMP}, |
</if> |
||||
</if> |
<if test="pluginId != null"> |
||||
<if test="recStatus != null"> |
#{pluginId,jdbcType=BIGINT}, |
||||
#{recStatus,jdbcType=TINYINT}, |
</if> |
||||
</if> |
<if test="businessPluginId != null"> |
||||
<if test="colspan != null"> |
#{businessPluginId,jdbcType=BIGINT}, |
||||
#{colspan,jdbcType=INTEGER}, |
</if> |
||||
</if> |
<if test="code != null"> |
||||
<if test="rowspan != null"> |
#{code,jdbcType=VARCHAR}, |
||||
#{rowspan,jdbcType=INTEGER}, |
</if> |
||||
</if> |
<if test="pluginInner != null"> |
||||
<if test="code != null"> |
#{pluginInner,jdbcType=TINYINT}, |
||||
#{code,jdbcType=VARCHAR}, |
</if> |
||||
</if> |
<if test="createdAt != null"> |
||||
</trim> |
#{createdAt,jdbcType=TIMESTAMP}, |
||||
</insert> |
</if> |
||||
<select id="countByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample" resultType="java.lang.Long"> |
<if test="updatedAt != null"> |
||||
select count(*) from t_pro_task_plugin |
#{updatedAt,jdbcType=TIMESTAMP}, |
||||
<if test="_parameter != null"> |
</if> |
||||
<include refid="Example_Where_Clause" /> |
<if test="recStatus != null"> |
||||
</if> |
#{recStatus,jdbcType=TINYINT}, |
||||
</select> |
</if> |
||||
<update id="updateByExampleSelective" parameterType="map"> |
<if test="colspan != null"> |
||||
update t_pro_task_plugin |
#{colspan,jdbcType=INTEGER}, |
||||
<set> |
</if> |
||||
<if test="record.id != null"> |
<if test="rowspan != null"> |
||||
id = #{record.id,jdbcType=BIGINT}, |
#{rowspan,jdbcType=INTEGER}, |
||||
</if> |
</if> |
||||
<if test="record.param != null"> |
</trim> |
||||
param = #{record.param,jdbcType=VARCHAR}, |
</insert> |
||||
</if> |
<select id="countByExample" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPluginExample" resultType="java.lang.Long"> |
||||
<if test="record.plginRow != null"> |
select count(*) from t_pro_task_plugin |
||||
plgin_row = #{record.plginRow,jdbcType=INTEGER}, |
<if test="_parameter != null"> |
||||
</if> |
<include refid="Example_Where_Clause" /> |
||||
<if test="record.plginCol != null"> |
</if> |
||||
plgin_col = #{record.plginCol,jdbcType=INTEGER}, |
</select> |
||||
</if> |
<update id="updateByExampleSelective" parameterType="map"> |
||||
<if test="record.taskDetailId != null"> |
update t_pro_task_plugin |
||||
task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, |
<set> |
||||
</if> |
<if test="record.id != null"> |
||||
<if test="record.pluginId != null"> |
id = #{record.id,jdbcType=BIGINT}, |
||||
plugin_id = #{record.pluginId,jdbcType=BIGINT}, |
</if> |
||||
</if> |
<if test="record.param != null"> |
||||
<if test="record.createdAt != null"> |
param = #{record.param,jdbcType=VARCHAR}, |
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
</if> |
||||
</if> |
<if test="record.plginRow != null"> |
||||
<if test="record.updatedAt != null"> |
plgin_row = #{record.plginRow,jdbcType=INTEGER}, |
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
</if> |
||||
</if> |
<if test="record.plginCol != null"> |
||||
<if test="record.recStatus != null"> |
plgin_col = #{record.plginCol,jdbcType=INTEGER}, |
||||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
</if> |
||||
</if> |
<if test="record.taskDetailId != null"> |
||||
<if test="record.colspan != null"> |
task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, |
||||
colspan = #{record.colspan,jdbcType=INTEGER}, |
</if> |
||||
</if> |
<if test="record.pluginId != null"> |
||||
<if test="record.rowspan != null"> |
plugin_id = #{record.pluginId,jdbcType=BIGINT}, |
||||
rowspan = #{record.rowspan,jdbcType=INTEGER}, |
</if> |
||||
</if> |
<if test="record.businessPluginId != null"> |
||||
<if test="record.code != null"> |
business_plugin_id = #{record.businessPluginId,jdbcType=BIGINT}, |
||||
code = #{record.code,jdbcType=VARCHAR}, |
</if> |
||||
</if> |
<if test="record.code != null"> |
||||
</set> |
code = #{record.code,jdbcType=VARCHAR}, |
||||
<if test="_parameter != null"> |
</if> |
||||
<include refid="Update_By_Example_Where_Clause" /> |
<if test="record.pluginInner != null"> |
||||
</if> |
plugin_inner = #{record.pluginInner,jdbcType=TINYINT}, |
||||
</update> |
</if> |
||||
<update id="updateByExample" parameterType="map"> |
<if test="record.createdAt != null"> |
||||
update t_pro_task_plugin |
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
set id = #{record.id,jdbcType=BIGINT}, |
</if> |
||||
param = #{record.param,jdbcType=VARCHAR}, |
<if test="record.updatedAt != null"> |
||||
plgin_row = #{record.plginRow,jdbcType=INTEGER}, |
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
plgin_col = #{record.plginCol,jdbcType=INTEGER}, |
</if> |
||||
task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, |
<if test="record.recStatus != null"> |
||||
plugin_id = #{record.pluginId,jdbcType=BIGINT}, |
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
</if> |
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
<if test="record.colspan != null"> |
||||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
colspan = #{record.colspan,jdbcType=INTEGER}, |
||||
colspan = #{record.colspan,jdbcType=INTEGER}, |
</if> |
||||
rowspan = #{record.rowspan,jdbcType=INTEGER}, |
<if test="record.rowspan != null"> |
||||
code = #{record.code,jdbcType=VARCHAR} |
rowspan = #{record.rowspan,jdbcType=INTEGER}, |
||||
<if test="_parameter != null"> |
</if> |
||||
<include refid="Update_By_Example_Where_Clause" /> |
</set> |
||||
</if> |
<if test="_parameter != null"> |
||||
</update> |
<include refid="Update_By_Example_Where_Clause" /> |
||||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
</if> |
||||
update t_pro_task_plugin |
</update> |
||||
<set> |
<update id="updateByExample" parameterType="map"> |
||||
<if test="param != null"> |
update t_pro_task_plugin |
||||
param = #{param,jdbcType=VARCHAR}, |
set id = #{record.id,jdbcType=BIGINT}, |
||||
</if> |
param = #{record.param,jdbcType=VARCHAR}, |
||||
<if test="plginRow != null"> |
plgin_row = #{record.plginRow,jdbcType=INTEGER}, |
||||
plgin_row = #{plginRow,jdbcType=INTEGER}, |
plgin_col = #{record.plginCol,jdbcType=INTEGER}, |
||||
</if> |
task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, |
||||
<if test="plginCol != null"> |
plugin_id = #{record.pluginId,jdbcType=BIGINT}, |
||||
plgin_col = #{plginCol,jdbcType=INTEGER}, |
business_plugin_id = #{record.businessPluginId,jdbcType=BIGINT}, |
||||
</if> |
code = #{record.code,jdbcType=VARCHAR}, |
||||
<if test="taskDetailId != null"> |
plugin_inner = #{record.pluginInner,jdbcType=TINYINT}, |
||||
task_detail_id = #{taskDetailId,jdbcType=BIGINT}, |
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
</if> |
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
<if test="pluginId != null"> |
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
plugin_id = #{pluginId,jdbcType=BIGINT}, |
colspan = #{record.colspan,jdbcType=INTEGER}, |
||||
</if> |
rowspan = #{record.rowspan,jdbcType=INTEGER} |
||||
<if test="createdAt != null"> |
<if test="_parameter != null"> |
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
<include refid="Update_By_Example_Where_Clause" /> |
||||
</if> |
</if> |
||||
<if test="updatedAt != null"> |
</update> |
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
||||
</if> |
update t_pro_task_plugin |
||||
<if test="recStatus != null"> |
<set> |
||||
rec_status = #{recStatus,jdbcType=TINYINT}, |
<if test="param != null"> |
||||
</if> |
param = #{param,jdbcType=VARCHAR}, |
||||
<if test="colspan != null"> |
</if> |
||||
colspan = #{colspan,jdbcType=INTEGER}, |
<if test="plginRow != null"> |
||||
</if> |
plgin_row = #{plginRow,jdbcType=INTEGER}, |
||||
<if test="rowspan != null"> |
</if> |
||||
rowspan = #{rowspan,jdbcType=INTEGER}, |
<if test="plginCol != null"> |
||||
</if> |
plgin_col = #{plginCol,jdbcType=INTEGER}, |
||||
<if test="code != null"> |
</if> |
||||
code = #{code,jdbcType=VARCHAR}, |
<if test="taskDetailId != null"> |
||||
</if> |
task_detail_id = #{taskDetailId,jdbcType=BIGINT}, |
||||
</set> |
</if> |
||||
where id = #{id,jdbcType=BIGINT} |
<if test="pluginId != null"> |
||||
</update> |
plugin_id = #{pluginId,jdbcType=BIGINT}, |
||||
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
</if> |
||||
update t_pro_task_plugin |
<if test="businessPluginId != null"> |
||||
set param = #{param,jdbcType=VARCHAR}, |
business_plugin_id = #{businessPluginId,jdbcType=BIGINT}, |
||||
plgin_row = #{plginRow,jdbcType=INTEGER}, |
</if> |
||||
plgin_col = #{plginCol,jdbcType=INTEGER}, |
<if test="code != null"> |
||||
task_detail_id = #{taskDetailId,jdbcType=BIGINT}, |
code = #{code,jdbcType=VARCHAR}, |
||||
plugin_id = #{pluginId,jdbcType=BIGINT}, |
</if> |
||||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
<if test="pluginInner != null"> |
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
plugin_inner = #{pluginInner,jdbcType=TINYINT}, |
||||
rec_status = #{recStatus,jdbcType=TINYINT}, |
</if> |
||||
colspan = #{colspan,jdbcType=INTEGER}, |
<if test="createdAt != null"> |
||||
rowspan = #{rowspan,jdbcType=INTEGER}, |
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
code = #{code,jdbcType=VARCHAR} |
</if> |
||||
where id = #{id,jdbcType=BIGINT} |
<if test="updatedAt != null"> |
||||
</update> |
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="colspan != null"> |
||||
|
colspan = #{colspan,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="rowspan != null"> |
||||
|
rowspan = #{rowspan,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptccsens.bean.po.ProTaskPlugin"> |
||||
|
update t_pro_task_plugin |
||||
|
set param = #{param,jdbcType=VARCHAR}, |
||||
|
plgin_row = #{plginRow,jdbcType=INTEGER}, |
||||
|
plgin_col = #{plginCol,jdbcType=INTEGER}, |
||||
|
task_detail_id = #{taskDetailId,jdbcType=BIGINT}, |
||||
|
plugin_id = #{pluginId,jdbcType=BIGINT}, |
||||
|
business_plugin_id = #{businessPluginId,jdbcType=BIGINT}, |
||||
|
code = #{code,jdbcType=VARCHAR}, |
||||
|
plugin_inner = #{pluginInner,jdbcType=TINYINT}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
colspan = #{colspan,jdbcType=INTEGER}, |
||||
|
rowspan = #{rowspan,jdbcType=INTEGER} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
</mapper> |
</mapper> |
||||
Loading…
Reference in new issue