Browse Source

20220126

master
zy_Java 4 years ago
parent
commit
049552a0b2
  1. 2
      pom.xml
  2. 11
      src/main/java/com/ccsens/ptos_zero/api/ZeroController.java
  3. 194
      src/main/java/com/ccsens/ptos_zero/bean/po/ProUser.java
  4. 1241
      src/main/java/com/ccsens/ptos_zero/bean/po/ProUserExample.java
  5. 20
      src/main/java/com/ccsens/ptos_zero/persist/dao/ProProjectDao.java
  6. 15
      src/main/java/com/ccsens/ptos_zero/persist/dao/UserDao.java
  7. 30
      src/main/java/com/ccsens/ptos_zero/persist/mapper/ProUserMapper.java
  8. 9
      src/main/java/com/ccsens/ptos_zero/service/IZeroCommonService.java
  9. 26
      src/main/java/com/ccsens/ptos_zero/service/ImportService.java
  10. 34
      src/main/java/com/ccsens/ptos_zero/service/TallService.java
  11. 29
      src/main/java/com/ccsens/ptos_zero/service/ZeroCommonService.java
  12. 2
      src/main/java/com/ccsens/ptos_zero/util/Constant.java
  13. 1
      src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java
  14. 1
      src/main/resources/druid-dev.yml
  15. 29
      src/main/resources/mapper_dao/ProProjectDao.xml
  16. 1
      src/main/resources/mapper_dao/ProTaskPluginDao.xml
  17. 16
      src/main/resources/mapper_dao/UserDao.xml
  18. 385
      src/main/resources/mapper_raw/ProUserMapper.xml
  19. 55
      src/main/resources/mbg.xml

2
pom.xml

@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.3.RELEASE</version>
<version>2.1.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.ccsens</groupId>

11
src/main/java/com/ccsens/ptos_zero/api/ZeroController.java

@ -20,10 +20,17 @@ public class ZeroController {
@Resource
private IZeroCommonService guideService;
// @ApiOperation(value = "查找引导页或广告页插件", notes = "")
// @RequestMapping(value = "/guide", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
// public JsonResponse<Long> queryPermanentGlobalTask(@RequestParam(required = true) Byte type) {
// Long pluginId = guideService.getGuidePlugin(type);
// return JsonResponse.newInstance().ok(pluginId);
// }
@ApiOperation(value = "查找引导页或广告页插件", notes = "")
@RequestMapping(value = "/guide", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
public JsonResponse<Long> queryPermanentGlobalTask(@RequestParam(required = true) Byte type) {
Long pluginId = guideService.getGuidePlugin(type);
public JsonResponse<String> queryPermanentGlobalTask(@RequestParam(required = true) Byte type) {
String pluginId = guideService.getGuidePlugin(type);
return JsonResponse.newInstance().ok(pluginId);
}

194
src/main/java/com/ccsens/ptos_zero/bean/po/ProUser.java

@ -0,0 +1,194 @@
package com.ccsens.ptos_zero.bean.po;
import java.io.Serializable;
import java.util.Date;
public class ProUser implements Serializable {
private Long id;
private String name;
private Byte gender;
private String avatarUrl;
private String country;
private String province;
private String city;
private String phone;
private String idCard;
private Byte power;
private String deviceId;
private Byte authType;
private Long operator;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Byte getGender() {
return gender;
}
public void setGender(Byte gender) {
this.gender = gender;
}
public String getAvatarUrl() {
return avatarUrl;
}
public void setAvatarUrl(String avatarUrl) {
this.avatarUrl = avatarUrl == null ? null : avatarUrl.trim();
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country == null ? null : country.trim();
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province == null ? null : province.trim();
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city == null ? null : city.trim();
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone == null ? null : phone.trim();
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard == null ? null : idCard.trim();
}
public Byte getPower() {
return power;
}
public void setPower(Byte power) {
this.power = power;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId == null ? null : deviceId.trim();
}
public Byte getAuthType() {
return authType;
}
public void setAuthType(Byte authType) {
this.authType = authType;
}
public Long getOperator() {
return operator;
}
public void setOperator(Long operator) {
this.operator = operator;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@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(", name=").append(name);
sb.append(", gender=").append(gender);
sb.append(", avatarUrl=").append(avatarUrl);
sb.append(", country=").append(country);
sb.append(", province=").append(province);
sb.append(", city=").append(city);
sb.append(", phone=").append(phone);
sb.append(", idCard=").append(idCard);
sb.append(", power=").append(power);
sb.append(", deviceId=").append(deviceId);
sb.append(", authType=").append(authType);
sb.append(", operator=").append(operator);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

1241
src/main/java/com/ccsens/ptos_zero/bean/po/ProUserExample.java

File diff suppressed because it is too large

20
src/main/java/com/ccsens/ptos_zero/persist/dao/ProProjectDao.java

@ -0,0 +1,20 @@
package com.ccsens.ptos_zero.persist.dao;
import com.ccsensptos.tallsdk.bean.vo.TallProjectVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
* @author AUSU
*/
@Repository
public interface ProProjectDao {
/**
* 根据id查找项目信息
* @param projectId 项目id(任务详情id)
* @return 项目详情
*/
TallProjectVo.ProjectInfo findProjectById(@Param("projectId") Long projectId);
}

15
src/main/java/com/ccsens/ptos_zero/persist/dao/UserDao.java

@ -0,0 +1,15 @@
package com.ccsens.ptos_zero.persist.dao;
import com.ccsens.ptos_zero.bean.po.ProUser;
import com.ccsens.ptos_zero.persist.mapper.ProUserMapper;
import org.apache.ibatis.annotations.Param;
public interface UserDao extends ProUserMapper {
/**
* 通过手机号获取userId
* @param phone
* @return
*/
ProUser getUserIdByPhone(@Param("phone") String phone);
}

30
src/main/java/com/ccsens/ptos_zero/persist/mapper/ProUserMapper.java

@ -0,0 +1,30 @@
package com.ccsens.ptos_zero.persist.mapper;
import com.ccsens.ptos_zero.bean.po.ProUser;
import com.ccsens.ptos_zero.bean.po.ProUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ProUserMapper {
long countByExample(ProUserExample example);
int deleteByExample(ProUserExample example);
int deleteByPrimaryKey(Long id);
int insert(ProUser record);
int insertSelective(ProUser record);
List<ProUser> selectByExample(ProUserExample example);
ProUser selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") ProUser record, @Param("example") ProUserExample example);
int updateByExample(@Param("record") ProUser record, @Param("example") ProUserExample example);
int updateByPrimaryKeySelective(ProUser record);
int updateByPrimaryKey(ProUser record);
}

9
src/main/java/com/ccsens/ptos_zero/service/IZeroCommonService.java

@ -4,10 +4,17 @@ package com.ccsens.ptos_zero.service;
* @author
*/
public interface IZeroCommonService {
// /**
// * 查找引导页或广告页插件
// * @param type 类型 0引导页 1广告页
// * @return 返回插件id
// */
// Long getGuidePlugin(Byte type);
/**
* 查找引导页或广告页插件
* @param type 类型 0引导页 1广告页
* @return 返回插件id
*/
Long getGuidePlugin(Byte type);
String getGuidePlugin(Byte type);
}

26
src/main/java/com/ccsens/ptos_zero/service/ImportService.java

@ -68,8 +68,8 @@ public class ImportService implements IImportService {
private ProParentTaskDao parentTaskMapper;
@Resource
private ProRoleTaskDao roleTaskMapper;
// @Resource
// private UserDao userDao;
@Resource
private UserDao userDao;
@Resource
private ProjectDao projectDao;
@Resource
@ -501,7 +501,17 @@ public class ImportService implements IImportService {
}
if(ObjectUtil.isNull(memberId)){
//TODO 根据成员手机号查找userId 成员关联userId
Long userId = null;
//根据手机号获取userId
ProUser user = userDao.getUserIdByPhone(memberPhone);
if(ObjectUtil.isNull(user)){
//TODO 如果未查到用户则添加一条新的用户信息
user = new ProUser();
user.setId(snowflake.nextId());
user.setPhone(memberPhone);
userDao.insertSelective(user);
}
Long userId = user.getId();
//添加成员至数据库
ProMember proMember = new ProMember();
proMember.setId(snowflake.nextId());
@ -523,7 +533,15 @@ public class ImportService implements IImportService {
//添加奖惩干系人
if(StrUtil.isNotEmpty(stakeholderName) && !"/".equalsIgnoreCase(roleName)){
//TODO 根据干系人手机号查找userId 奖惩干系人关联userId
Long userId = null;
ProUser user = userDao.getUserIdByPhone(stakeholderPhone);
if(ObjectUtil.isNull(user)){
//TODO 如果未查到用户则添加一条新的用户信息
user = new ProUser();
user.setId(snowflake.nextId());
user.setPhone(stakeholderPhone);
userDao.insertSelective(user);
}
Long userId = user.getId();
ProMemberStakeholder memberStakeholder = new ProMemberStakeholder();
memberStakeholder.setId(snowflake.nextId());
memberStakeholder.setMemeberId(memberId);

34
src/main/java/com/ccsens/ptos_zero/service/TallService.java

@ -145,6 +145,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.ccsens.ptos_zero.bean.po.ProRole;
import com.ccsens.ptos_zero.bean.po.ProRoleExample;
import com.ccsens.ptos_zero.bean.po.ProUser;
import com.ccsens.ptos_zero.persist.dao.*;
import com.ccsens.ptos_zero.util.Constant;
import com.ccsens.ptos_zero.util.ZeroCodeError;
@ -198,13 +199,34 @@ public class TallService implements ITallService {
private ProTaskPluginDao taskPluginDao;
@Resource
private IImportService importService;
@Resource
private ProProjectDao proProjectDao;
@Resource
private UserDao userDao;
@Override
public TallProjectVo.ProjectInfo findProjectById(String header, TallProjectDto.ProjectById params) {
TallProjectVo.ProjectInfo projectById = proProjectDao.findProjectById(params.getProjectId());
if (ObjectUtil.isNull(projectById)){
throw new BaseException(ZeroCodeError.PROJECT_NOT_FOUND);
}
return projectById;
}
@SneakyThrows
@Override
public TallProjectVo.ProjectInfo importWbs(String token, MultipartFile params) {
//TODO 根据token获取用户信息
TallTokenVo.UserIdByToken userByToken = TokenUtil.getUserByToken(new TallTokenDto.GetUserByToken(token, "appId", "secret"));
//通过手机号获取用户在服务内的userId
ProUser user = null;
if(ObjectUtil.isNotNull(userByToken) && StrUtil.isNotBlank(userByToken.getPhone())){
user = userDao.getUserIdByPhone(userByToken.getPhone());
}
if(user == null){
throw new BaseException(CodeEnum.NOT_LOGIN);
}
if(ObjectUtil.isNull(userByToken)){
throw new BaseException(CodeEnum.NOT_LOGIN);
}
@ -234,9 +256,9 @@ public class TallService implements ITallService {
List<TallProjectVo.ProjectInfo> projectInfos = new ArrayList<>();
TallProjectVo.ProjectInfo projectInfo = new TallProjectVo.ProjectInfo();
projectInfo.setId(1L);
projectInfo.setId(1485932638408675328L);
projectInfo.setName("零号项目");
projectInfo.setUrl("http://127.0.0.1:7310");
projectInfo.setUrl("http://101.201.226.163:7310");
projectInfo.setBusinessCode("zero");
projectInfo.setDomainCode("tall_dh");
projectInfos.add(projectInfo);
@ -250,14 +272,18 @@ public class TallService implements ITallService {
if(ObjectUtil.isNull(userByToken)){
throw new BaseException(CodeEnum.NOT_LOGIN);
}
//通过手机号获取用户在服务内的userId
ProUser user = null;
if(ObjectUtil.isNotNull(userByToken) && StrUtil.isNotBlank(userByToken.getPhone())){
user = userDao.getUserIdByPhone(userByToken.getPhone());
}
//返回的对象
TallRoleVo.QueryRole queryRole = new TallRoleVo.QueryRole();
List<TallRoleVo.RoleInfo> visibleList = new ArrayList<>();
List<TallRoleVo.RoleInfo> invisibleList = new ArrayList<>();
//查询当前用户在项目下的角色,没有则算作关注者
List<ProRole> userRoleList = proRoleDao.queryRoleByUserId(param.getProjectId(),userByToken.getId());
List<ProRole> userRoleList = proRoleDao.queryRoleByUserId(param.getProjectId(),user == null ? null : user.getId());
//查询用户可见的角色
List<TallRoleVo.RoleInfo> roleInfoList = new ArrayList<>();
if(CollectionUtil.isNotEmpty(userRoleList)){

29
src/main/java/com/ccsens/ptos_zero/service/ZeroCommonService.java

@ -30,9 +30,32 @@ public class ZeroCommonService implements IZeroCommonService {
@Resource
private ProTaskPluginDao taskPluginDao;
// @Override
// public Long getGuidePlugin(Byte type) {
// Long plugin = null;
// //查找零号项目
// ProTaskDetail proTaskDetail = taskDetailDao.selectByPrimaryKey(Constant.ZERO_PROJECT_ID);
// if(ObjectUtil.isNull(proTaskDetail)){
// return null;
// }
// //查找项目下的引导页或广告页任务
// TaskDto.QueryTaskOfProject taskOfProject = new TaskDto.QueryTaskOfProject();
// taskOfProject.setProjectId(Constant.ZERO_PROJECT_ID);
// taskOfProject.setName(type == 0 ? Constant.ZERO_GUIDE : Constant.ZERO_ADVERTISING);
// List<TaskVo.TaskOfProject> taskOfProjects = taskDetailDao.queryTaskOfProject(taskOfProject);
// if(CollectionUtil.isNotEmpty(taskOfProjects)){
// //查找任务关联的插件id
// List<TallTaskVo.TaskPluginInfo> taskPluginInfos = taskPluginDao.queryTaskOfPlugin(taskOfProjects.get(0).getDetailId());
// if(CollectionUtil.isNotEmpty(taskPluginInfos)){
// plugin = taskPluginInfos.get(0).getPluginId();
// }
// }
// return plugin;
// }
@Override
public Long getGuidePlugin(Byte type) {
Long plugin = null;
public String getGuidePlugin(Byte type) {
String plugin = null;
//查找零号项目
ProTaskDetail proTaskDetail = taskDetailDao.selectByPrimaryKey(Constant.ZERO_PROJECT_ID);
if(ObjectUtil.isNull(proTaskDetail)){
@ -47,7 +70,7 @@ public class ZeroCommonService implements IZeroCommonService {
//查找任务关联的插件id
List<TallTaskVo.TaskPluginInfo> taskPluginInfos = taskPluginDao.queryTaskOfPlugin(taskOfProjects.get(0).getDetailId());
if(CollectionUtil.isNotEmpty(taskPluginInfos)){
plugin = taskPluginInfos.get(0).getPluginId();
plugin = taskPluginInfos.get(0).getParam();
}
}
return plugin;

2
src/main/java/com/ccsens/ptos_zero/util/Constant.java

@ -10,7 +10,7 @@ import java.util.Map;
public class Constant {
/**零号项目Id*/
public static Long ZERO_PROJECT_ID = 1484800783814889472L;
public static Long ZERO_PROJECT_ID = 1485932638408675328L;
/**引导页任务名*/
public static String ZERO_GUIDE = "引导页";
/**广告页任务名*/

1
src/main/java/com/ccsens/ptos_zero/util/ZeroCodeError.java

@ -33,4 +33,5 @@ public class ZeroCodeError extends CodeError {
public static final Code NOT_PERMISSION = new Code(524,"没有权限!", true);
public static final Code ROLE_ERROR = new Code(525,"角色信息错误!", true);
public static final Code PROJECT_NOT_FOUND = new Code(526,"项目不存在,请检查后再试!", true);
}

1
src/main/resources/druid-dev.yml

@ -28,6 +28,7 @@ spring:
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://101.201.226.163:3306/tall_dh_zero?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
# url: jdbc:mysql://test.tall.wiki/pt_ccsens?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_TALL

29
src/main/resources/mapper_dao/ProProjectDao.xml

@ -0,0 +1,29 @@
<?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">
<mapper namespace="com.ccsens.ptos_zero.persist.dao.ProProjectDao">
<select id="findProjectById" resultType="com.ccsensptos.tallsdk.bean.vo.TallProjectVo$ProjectInfo">
SELECT
d.id,
d.`name`,
d.description,
d.cycle,
s.plan_start_time,
s.plan_duration,
s.plan_end_time,
s.real_start_time,
s.real_duration,
s.real_end_time
FROM
t_pro_task_detail AS d
LEFT JOIN t_pro_task_sub AS s ON d.id = s.task_detail_id
WHERE
d.rec_status = 0
AND s.rec_status = 0
AND d.id = #{projectId}
ORDER BY
s.plan_start_time DESC
LIMIT 1
</select>
</mapper>

1
src/main/resources/mapper_dao/ProTaskPluginDao.xml

@ -31,6 +31,7 @@
<select id="queryTaskOfPlugin" resultType="com.ccsensptos.tallsdk.bean.vo.TallTaskVo$TaskPluginInfo">
SELECT
tp.plugin_id AS pluginId,
tp.code AS pluginCode,
tp.param As param,
tp.plgin_row AS `row`,
tp.plgin_col AS col,

16
src/main/resources/mapper_dao/UserDao.xml

@ -0,0 +1,16 @@
<?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">
<mapper namespace="com.ccsens.ptos_zero.persist.dao.UserDao">
<select id="getUserIdByPhone" resultType="com.ccsens.ptos_zero.bean.po.ProUser">
select
*
from
t_pro_user
where
phone = #{phone}
and rec_status = 0
limit 1
</select>
</mapper>

385
src/main/resources/mapper_raw/ProUserMapper.xml

@ -0,0 +1,385 @@
<?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">
<mapper namespace="com.ccsens.ptos_zero.persist.mapper.ProUserMapper">
<resultMap id="BaseResultMap" type="com.ccsens.ptos_zero.bean.po.ProUser">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="gender" jdbcType="TINYINT" property="gender" />
<result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl" />
<result column="country" jdbcType="VARCHAR" property="country" />
<result column="province" jdbcType="VARCHAR" property="province" />
<result column="city" jdbcType="VARCHAR" property="city" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="id_card" jdbcType="VARCHAR" property="idCard" />
<result column="power" jdbcType="TINYINT" property="power" />
<result column="device_id" jdbcType="VARCHAR" property="deviceId" />
<result column="auth_type" jdbcType="TINYINT" property="authType" />
<result column="operator" jdbcType="BIGINT" property="operator" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, name, gender, avatar_url, country, province, city, phone, id_card, power, device_id,
auth_type, operator, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.ptos_zero.bean.po.ProUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_pro_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_pro_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_pro_user
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.ptos_zero.bean.po.ProUserExample">
delete from t_pro_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.ptos_zero.bean.po.ProUser">
insert into t_pro_user (id, name, gender,
avatar_url, country, province,
city, phone, id_card,
power, device_id, auth_type,
operator, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT},
#{avatarUrl,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
#{city,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR},
#{power,jdbcType=TINYINT}, #{deviceId,jdbcType=VARCHAR}, #{authType,jdbcType=TINYINT},
#{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.ptos_zero.bean.po.ProUser">
insert into t_pro_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="gender != null">
gender,
</if>
<if test="avatarUrl != null">
avatar_url,
</if>
<if test="country != null">
country,
</if>
<if test="province != null">
province,
</if>
<if test="city != null">
city,
</if>
<if test="phone != null">
phone,
</if>
<if test="idCard != null">
id_card,
</if>
<if test="power != null">
power,
</if>
<if test="deviceId != null">
device_id,
</if>
<if test="authType != null">
auth_type,
</if>
<if test="operator != null">
operator,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="gender != null">
#{gender,jdbcType=TINYINT},
</if>
<if test="avatarUrl != null">
#{avatarUrl,jdbcType=VARCHAR},
</if>
<if test="country != null">
#{country,jdbcType=VARCHAR},
</if>
<if test="province != null">
#{province,jdbcType=VARCHAR},
</if>
<if test="city != null">
#{city,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="idCard != null">
#{idCard,jdbcType=VARCHAR},
</if>
<if test="power != null">
#{power,jdbcType=TINYINT},
</if>
<if test="deviceId != null">
#{deviceId,jdbcType=VARCHAR},
</if>
<if test="authType != null">
#{authType,jdbcType=TINYINT},
</if>
<if test="operator != null">
#{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.ptos_zero.bean.po.ProUserExample" resultType="java.lang.Long">
select count(*) from t_pro_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_pro_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.gender != null">
gender = #{record.gender,jdbcType=TINYINT},
</if>
<if test="record.avatarUrl != null">
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR},
</if>
<if test="record.country != null">
country = #{record.country,jdbcType=VARCHAR},
</if>
<if test="record.province != null">
province = #{record.province,jdbcType=VARCHAR},
</if>
<if test="record.city != null">
city = #{record.city,jdbcType=VARCHAR},
</if>
<if test="record.phone != null">
phone = #{record.phone,jdbcType=VARCHAR},
</if>
<if test="record.idCard != null">
id_card = #{record.idCard,jdbcType=VARCHAR},
</if>
<if test="record.power != null">
power = #{record.power,jdbcType=TINYINT},
</if>
<if test="record.deviceId != null">
device_id = #{record.deviceId,jdbcType=VARCHAR},
</if>
<if test="record.authType != null">
auth_type = #{record.authType,jdbcType=TINYINT},
</if>
<if test="record.operator != null">
operator = #{record.operator,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_pro_user
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
gender = #{record.gender,jdbcType=TINYINT},
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR},
country = #{record.country,jdbcType=VARCHAR},
province = #{record.province,jdbcType=VARCHAR},
city = #{record.city,jdbcType=VARCHAR},
phone = #{record.phone,jdbcType=VARCHAR},
id_card = #{record.idCard,jdbcType=VARCHAR},
power = #{record.power,jdbcType=TINYINT},
device_id = #{record.deviceId,jdbcType=VARCHAR},
auth_type = #{record.authType,jdbcType=TINYINT},
operator = #{record.operator,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ptos_zero.bean.po.ProUser">
update t_pro_user
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="gender != null">
gender = #{gender,jdbcType=TINYINT},
</if>
<if test="avatarUrl != null">
avatar_url = #{avatarUrl,jdbcType=VARCHAR},
</if>
<if test="country != null">
country = #{country,jdbcType=VARCHAR},
</if>
<if test="province != null">
province = #{province,jdbcType=VARCHAR},
</if>
<if test="city != null">
city = #{city,jdbcType=VARCHAR},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="idCard != null">
id_card = #{idCard,jdbcType=VARCHAR},
</if>
<if test="power != null">
power = #{power,jdbcType=TINYINT},
</if>
<if test="deviceId != null">
device_id = #{deviceId,jdbcType=VARCHAR},
</if>
<if test="authType != null">
auth_type = #{authType,jdbcType=TINYINT},
</if>
<if test="operator != null">
operator = #{operator,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.ptos_zero.bean.po.ProUser">
update t_pro_user
set name = #{name,jdbcType=VARCHAR},
gender = #{gender,jdbcType=TINYINT},
avatar_url = #{avatarUrl,jdbcType=VARCHAR},
country = #{country,jdbcType=VARCHAR},
province = #{province,jdbcType=VARCHAR},
city = #{city,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
id_card = #{idCard,jdbcType=VARCHAR},
power = #{power,jdbcType=TINYINT},
device_id = #{deviceId,jdbcType=VARCHAR},
auth_type = #{authType,jdbcType=TINYINT},
operator = #{operator,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

55
src/main/resources/mbg.xml

@ -57,34 +57,35 @@
</javaClientGenerator>
<table tableName="t_constant" domainObjectName="Constant"></table>
<table tableName="t_label" domainObjectName="Label"></table>
<table tableName="t_label_business" domainObjectName="LabelBusiness"></table>
<table tableName="t_label_type" domainObjectName="LabelType"></table>
<table tableName="t_pro_member" domainObjectName="ProMember"></table>
<table tableName="t_pro_parent_task" domainObjectName="ProParentTask"></table>
<table tableName="t_pro_role" domainObjectName="ProRole"></table>
<table tableName="t_pro_role_member" domainObjectName="ProRoleMember"></table>
<table tableName="t_pro_role_repulsion" domainObjectName="ProRoleRepulsion"></table>
<table tableName="t_pro_role_show" domainObjectName="ProRoleShow"></table>
<table tableName="t_pro_role_task" domainObjectName="ProRoleTask"></table>
<table tableName="t_pro_task_detail" domainObjectName="ProTaskDetail"></table>
<table tableName="t_pro_task_flow" domainObjectName="ProTaskFlow"></table>
<table tableName="t_pro_task_notify" domainObjectName="ProTaskNotify"></table>
<table tableName="t_pro_task_panel_info" domainObjectName="ProTaskPanelInfo"></table>
<table tableName="t_pro_task_plugin" domainObjectName="ProTaskPlugin"></table>
<table tableName="t_pro_task_process" domainObjectName="ProTaskProcess"></table>
<table tableName="t_pro_task_share" domainObjectName="ProTaskShare"></table>
<table tableName="t_pro_task_status_record" domainObjectName="ProTaskStatusRecord"></table>
<table tableName="t_pro_task_sub" domainObjectName="ProTaskSub"></table>
<table tableName="t_pro_task_version" domainObjectName="ProTaskVersion"></table>
<table tableName="t_pro_member_stakeholder" domainObjectName="ProMemberStakeholder"></table>
<!-- <table tableName="t_constant" domainObjectName="Constant"></table>-->
<!-- <table tableName="t_label" domainObjectName="Label"></table>-->
<!-- <table tableName="t_label_business" domainObjectName="LabelBusiness"></table>-->
<!-- <table tableName="t_label_type" domainObjectName="LabelType"></table>-->
<!-- <table tableName="t_pro_member" domainObjectName="ProMember"></table>-->
<!-- <table tableName="t_pro_parent_task" domainObjectName="ProParentTask"></table>-->
<!-- <table tableName="t_pro_role" domainObjectName="ProRole"></table>-->
<!-- <table tableName="t_pro_role_member" domainObjectName="ProRoleMember"></table>-->
<!-- <table tableName="t_pro_role_repulsion" domainObjectName="ProRoleRepulsion"></table>-->
<!-- <table tableName="t_pro_role_show" domainObjectName="ProRoleShow"></table>-->
<!-- <table tableName="t_pro_role_task" domainObjectName="ProRoleTask"></table>-->
<!-- <table tableName="t_pro_task_detail" domainObjectName="ProTaskDetail"></table>-->
<!-- <table tableName="t_pro_task_flow" domainObjectName="ProTaskFlow"></table>-->
<!-- <table tableName="t_pro_task_notify" domainObjectName="ProTaskNotify"></table>-->
<!-- <table tableName="t_pro_task_panel_info" domainObjectName="ProTaskPanelInfo"></table>-->
<!-- <table tableName="t_pro_task_plugin" domainObjectName="ProTaskPlugin"></table>-->
<!-- <table tableName="t_pro_task_process" domainObjectName="ProTaskProcess"></table>-->
<!-- <table tableName="t_pro_task_share" domainObjectName="ProTaskShare"></table>-->
<!-- <table tableName="t_pro_task_status_record" domainObjectName="ProTaskStatusRecord"></table>-->
<!-- <table tableName="t_pro_task_sub" domainObjectName="ProTaskSub"></table>-->
<!-- <table tableName="t_pro_task_version" domainObjectName="ProTaskVersion"></table>-->
<!-- <table tableName="t_pro_member_stakeholder" domainObjectName="ProMemberStakeholder"></table>-->
<table tableName="t_pro_user" domainObjectName="ProUser"></table>
<table tableName="t_plu_deliver" domainObjectName="PluDeliver"></table>
<table tableName="t_plu_deliver_record" domainObjectName="PluDeliverRecord"></table>
<table tableName="t_plu_deliver_record_file" domainObjectName="PluDeliverRecordFile"></table>
<table tableName="t_plu_deliver_record_check" domainObjectName="PluDeliverRecordCheck"></table>
<table tableName="t_plu_deliver_record_check_log" domainObjectName="PluDeliverRecordCheckLog"></table>
<!-- <table tableName="t_plu_deliver" domainObjectName="PluDeliver"></table>-->
<!-- <table tableName="t_plu_deliver_record" domainObjectName="PluDeliverRecord"></table>-->
<!-- <table tableName="t_plu_deliver_record_file" domainObjectName="PluDeliverRecordFile"></table>-->
<!-- <table tableName="t_plu_deliver_record_check" domainObjectName="PluDeliverRecordCheck"></table>-->
<!-- <table tableName="t_plu_deliver_record_check_log" domainObjectName="PluDeliverRecordCheckLog"></table>-->

Loading…
Cancel
Save