提交 6a8a3329 编写于 作者:  Peijun.zhao's avatar Peijun.zhao

add pat health pack

上级 3bd6069b
// Copyright 2016-2101 Pica.
package com.pica.cloud.account.account.common.req;
import io.swagger.annotations.ApiModel;
/**
* @ClassName AcctPatInfoReq
* @Description TODO
* @Author peijun.zhao
* @Date 2020/5/12 16:16
* @ModifyDate 2020/5/12 16:16
* @Version 1.0
*/
@ApiModel
public class AcctPatInfoReq {
private String name;
private String mobile;
private String unionId;
private Integer acctId;
private Integer type;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getUnionId() {
return unionId;
}
public void setUnionId(String unionId) {
this.unionId = unionId;
}
public Integer getAcctId() {
return acctId;
}
public void setAcctId(Integer acctId) {
this.acctId = acctId;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
// Copyright 2016-2101 Pica.
package com.pica.cloud.account.account.server.controller;
import com.pica.cloud.account.account.common.req.AcctPatInfoReq;
import com.pica.cloud.account.account.server.entity.AcctPatInfo;
import com.pica.cloud.foundation.entity.PicaResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
/**
* @Description TODO
* @Author peijun.zhao
* @Date 2020/5/12 15:55
* @ModifyDate 2020/5/12 15:55
* @Params
* @Return
*/
@Api(description = "健康包")
@RestController
@RequestMapping("/pat/health")
public class PatHealthPackController {
@ApiOperation("获取主账户ID")
@GetMapping(value = "/{unionId}")
public PicaResponse getAcctIdByUnionId(@PathVariable("unionId") String unionId) throws Exception {
return PicaResponse.toResponse("mockUnionId-123");
}
@ApiOperation("保存主账户")
@PostMapping(value = "/acct")
public PicaResponse saveAcct(@RequestBody AcctPatInfoReq patInfoReq) throws Exception {
AcctPatInfo patInfo = new AcctPatInfo();
patInfo.setName("db已有用户A");
patInfo.setMobilePhone("1234567");
return PicaResponse.toResponse(patInfo);
}
@ApiOperation("建立微信与账号关联关系")
@PostMapping(value = "/bindUnion")
public PicaResponse bindUnion(@RequestBody AcctPatInfoReq patInfoReq) throws Exception {
// AcctPatInfo patInfo = new AcctPatInfo();
// patInfo.setName("db已有用户A");
// patInfo.setMobilePhone("1234567");
return PicaResponse.toResponse("success");
}
@ApiOperation("建立微信与账号关联关系")
@PostMapping(value = "/bindUnion")
public PicaResponse bindUnion1(@RequestBody AcctPatInfoReq patInfoReq) throws Exception {
// AcctPatInfo patInfo = new AcctPatInfo();
// patInfo.setName("db已有用户A");
// patInfo.setMobilePhone("1234567");
return PicaResponse.toResponse("success");
}
}
package com.pica.cloud.account.account.server.entity;
import java.util.Date;
public class AcctPatFamily {
private Integer id;
private Integer acctId;
private Integer patientId;
private Integer relation;
private Integer deleteFlag;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getAcctId() {
return acctId;
}
public void setAcctId(Integer acctId) {
this.acctId = acctId;
}
public Integer getPatientId() {
return patientId;
}
public void setPatientId(Integer patientId) {
this.patientId = patientId;
}
public Integer getRelation() {
return relation;
}
public void setRelation(Integer relation) {
this.relation = relation;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
}
\ No newline at end of file
package com.pica.cloud.account.account.server.entity;
import java.util.Date;
public class AcctPatInfo {
private Integer id;
private String name;
private String mobilePhone;
private String password;
private Integer registerProduct;
private Integer registerSource;
private Date birthday;
private Integer age;
private Byte sex;
private String idCard;
private Date regTime;
private Integer deleteFlag;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getMobilePhone() {
return mobilePhone;
}
public void setMobilePhone(String mobilePhone) {
this.mobilePhone = mobilePhone == null ? null : mobilePhone.trim();
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password == null ? null : password.trim();
}
public Integer getRegisterProduct() {
return registerProduct;
}
public void setRegisterProduct(Integer registerProduct) {
this.registerProduct = registerProduct;
}
public Integer getRegisterSource() {
return registerSource;
}
public void setRegisterSource(Integer registerSource) {
this.registerSource = registerSource;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Byte getSex() {
return sex;
}
public void setSex(Byte sex) {
this.sex = sex;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard == null ? null : idCard.trim();
}
public Date getRegTime() {
return regTime;
}
public void setRegTime(Date regTime) {
this.regTime = regTime;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
}
\ No newline at end of file
package com.pica.cloud.account.account.server.entity;
import java.util.Date;
public class AcctPatUnion {
private Integer id;
private Integer acctId;
private Integer unionType;
private String unionId;
private Integer deleteFlag;
private Integer createdId;
private Date createdTime;
private Integer modifiedId;
private Date modifiedTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getAcctId() {
return acctId;
}
public void setAcctId(Integer acctId) {
this.acctId = acctId;
}
public Integer getUnionType() {
return unionType;
}
public void setUnionType(Integer unionType) {
this.unionType = unionType;
}
public String getUnionId() {
return unionId;
}
public void setUnionId(String unionId) {
this.unionId = unionId == null ? null : unionId.trim();
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
public Integer getCreatedId() {
return createdId;
}
public void setCreatedId(Integer createdId) {
this.createdId = createdId;
}
public Date getCreatedTime() {
return createdTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
}
public Integer getModifiedId() {
return modifiedId;
}
public void setModifiedId(Integer modifiedId) {
this.modifiedId = modifiedId;
}
public Date getModifiedTime() {
return modifiedTime;
}
public void setModifiedTime(Date modifiedTime) {
this.modifiedTime = modifiedTime;
}
}
\ No newline at end of file
package com.pica.cloud.account.account.server.mapper;
import com.pica.cloud.account.account.server.entity.AcctPatFamily;
public interface AcctPatFamilyMapper {
int deleteByPrimaryKey(Integer id);
int insert(AcctPatFamily record);
int insertSelective(AcctPatFamily record);
AcctPatFamily selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(AcctPatFamily record);
int updateByPrimaryKey(AcctPatFamily record);
}
\ No newline at end of file
package com.pica.cloud.account.account.server.mapper;
import com.pica.cloud.account.account.server.entity.AcctPatInfo;
public interface AcctPatInfoMapper {
int deleteByPrimaryKey(Integer id);
int insert(AcctPatInfo record);
int insertSelective(AcctPatInfo record);
AcctPatInfo selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(AcctPatInfo record);
int updateByPrimaryKey(AcctPatInfo record);
}
\ No newline at end of file
package com.pica.cloud.account.account.server.mapper;
import com.pica.cloud.account.account.server.entity.AcctPatUnion;
public interface AcctPatUnionMapper {
int deleteByPrimaryKey(Integer id);
int insert(AcctPatUnion record);
int insertSelective(AcctPatUnion record);
AcctPatUnion selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(AcctPatUnion record);
int updateByPrimaryKey(AcctPatUnion record);
}
\ No newline at end of file
<?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.pica.cloud.account.account.server.mapper.AcctPatFamilyMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.AcctPatFamily" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="acct_id" property="acctId" jdbcType="INTEGER" />
<result column="patient_id" property="patientId" jdbcType="INTEGER" />
<result column="relation" property="relation" jdbcType="INTEGER" />
<result column="delete_flag" property="deleteFlag" jdbcType="INTEGER" />
<result column="created_id" property="createdId" jdbcType="INTEGER" />
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP" />
<result column="modified_id" property="modifiedId" jdbcType="INTEGER" />
<result column="modified_time" property="modifiedTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, acct_id, patient_id, relation, delete_flag, created_id, created_time, modified_id,
modified_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from account_pat_family
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from account_pat_family
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.AcctPatFamily" >
insert into account_pat_family (id, acct_id, patient_id,
relation, delete_flag, created_id,
created_time, modified_id, modified_time
)
values (#{id,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER}, #{patientId,jdbcType=INTEGER},
#{relation,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER}, #{createdId,jdbcType=INTEGER},
#{createdTime,jdbcType=TIMESTAMP}, #{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.AcctPatFamily" >
insert into account_pat_family
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="acctId != null" >
acct_id,
</if>
<if test="patientId != null" >
patient_id,
</if>
<if test="relation != null" >
relation,
</if>
<if test="deleteFlag != null" >
delete_flag,
</if>
<if test="createdId != null" >
created_id,
</if>
<if test="createdTime != null" >
created_time,
</if>
<if test="modifiedId != null" >
modified_id,
</if>
<if test="modifiedTime != null" >
modified_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="acctId != null" >
#{acctId,jdbcType=INTEGER},
</if>
<if test="patientId != null" >
#{patientId,jdbcType=INTEGER},
</if>
<if test="relation != null" >
#{relation,jdbcType=INTEGER},
</if>
<if test="deleteFlag != null" >
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createdId != null" >
#{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
#{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.AcctPatFamily" >
update account_pat_family
<set >
<if test="acctId != null" >
acct_id = #{acctId,jdbcType=INTEGER},
</if>
<if test="patientId != null" >
patient_id = #{patientId,jdbcType=INTEGER},
</if>
<if test="relation != null" >
relation = #{relation,jdbcType=INTEGER},
</if>
<if test="deleteFlag != null" >
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createdId != null" >
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.AcctPatFamily" >
update account_pat_family
set acct_id = #{acctId,jdbcType=INTEGER},
patient_id = #{patientId,jdbcType=INTEGER},
relation = #{relation,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?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.pica.cloud.account.account.server.mapper.AcctPatInfoMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.AcctPatInfo" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="mobile_phone" property="mobilePhone" jdbcType="VARCHAR" />
<result column="password" property="password" jdbcType="VARCHAR" />
<result column="register_product" property="registerProduct" jdbcType="INTEGER" />
<result column="register_source" property="registerSource" jdbcType="INTEGER" />
<result column="birthday" property="birthday" jdbcType="DATE" />
<result column="age" property="age" jdbcType="INTEGER" />
<result column="sex" property="sex" jdbcType="TINYINT" />
<result column="id_card" property="idCard" jdbcType="VARCHAR" />
<result column="reg_time" property="regTime" jdbcType="TIMESTAMP" />
<result column="delete_flag" property="deleteFlag" jdbcType="INTEGER" />
<result column="created_id" property="createdId" jdbcType="INTEGER" />
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP" />
<result column="modified_id" property="modifiedId" jdbcType="INTEGER" />
<result column="modified_time" property="modifiedTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, name, mobile_phone, password, register_product, register_source, birthday, age,
sex, id_card, reg_time, delete_flag, created_id, created_time, modified_id, modified_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from account_pat_info
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from account_pat_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.AcctPatInfo" >
insert into account_pat_info (id, name, mobile_phone,
password, register_product, register_source,
birthday, age, sex, id_card,
reg_time, delete_flag, created_id,
created_time, modified_id, modified_time
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{mobilePhone,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR}, #{registerProduct,jdbcType=INTEGER}, #{registerSource,jdbcType=INTEGER},
#{birthday,jdbcType=DATE}, #{age,jdbcType=INTEGER}, #{sex,jdbcType=TINYINT}, #{idCard,jdbcType=VARCHAR},
#{regTime,jdbcType=TIMESTAMP}, #{deleteFlag,jdbcType=INTEGER}, #{createdId,jdbcType=INTEGER},
#{createdTime,jdbcType=TIMESTAMP}, #{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.AcctPatInfo" >
insert into account_pat_info
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="name != null" >
name,
</if>
<if test="mobilePhone != null" >
mobile_phone,
</if>
<if test="password != null" >
password,
</if>
<if test="registerProduct != null" >
register_product,
</if>
<if test="registerSource != null" >
register_source,
</if>
<if test="birthday != null" >
birthday,
</if>
<if test="age != null" >
age,
</if>
<if test="sex != null" >
sex,
</if>
<if test="idCard != null" >
id_card,
</if>
<if test="regTime != null" >
reg_time,
</if>
<if test="deleteFlag != null" >
delete_flag,
</if>
<if test="createdId != null" >
created_id,
</if>
<if test="createdTime != null" >
created_time,
</if>
<if test="modifiedId != null" >
modified_id,
</if>
<if test="modifiedTime != null" >
modified_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="mobilePhone != null" >
#{mobilePhone,jdbcType=VARCHAR},
</if>
<if test="password != null" >
#{password,jdbcType=VARCHAR},
</if>
<if test="registerProduct != null" >
#{registerProduct,jdbcType=INTEGER},
</if>
<if test="registerSource != null" >
#{registerSource,jdbcType=INTEGER},
</if>
<if test="birthday != null" >
#{birthday,jdbcType=DATE},
</if>
<if test="age != null" >
#{age,jdbcType=INTEGER},
</if>
<if test="sex != null" >
#{sex,jdbcType=TINYINT},
</if>
<if test="idCard != null" >
#{idCard,jdbcType=VARCHAR},
</if>
<if test="regTime != null" >
#{regTime,jdbcType=TIMESTAMP},
</if>
<if test="deleteFlag != null" >
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createdId != null" >
#{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
#{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.AcctPatInfo" >
update account_pat_info
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="mobilePhone != null" >
mobile_phone = #{mobilePhone,jdbcType=VARCHAR},
</if>
<if test="password != null" >
password = #{password,jdbcType=VARCHAR},
</if>
<if test="registerProduct != null" >
register_product = #{registerProduct,jdbcType=INTEGER},
</if>
<if test="registerSource != null" >
register_source = #{registerSource,jdbcType=INTEGER},
</if>
<if test="birthday != null" >
birthday = #{birthday,jdbcType=DATE},
</if>
<if test="age != null" >
age = #{age,jdbcType=INTEGER},
</if>
<if test="sex != null" >
sex = #{sex,jdbcType=TINYINT},
</if>
<if test="idCard != null" >
id_card = #{idCard,jdbcType=VARCHAR},
</if>
<if test="regTime != null" >
reg_time = #{regTime,jdbcType=TIMESTAMP},
</if>
<if test="deleteFlag != null" >
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createdId != null" >
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.AcctPatInfo" >
update account_pat_info
set name = #{name,jdbcType=VARCHAR},
mobile_phone = #{mobilePhone,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
register_product = #{registerProduct,jdbcType=INTEGER},
register_source = #{registerSource,jdbcType=INTEGER},
birthday = #{birthday,jdbcType=DATE},
age = #{age,jdbcType=INTEGER},
sex = #{sex,jdbcType=TINYINT},
id_card = #{idCard,jdbcType=VARCHAR},
reg_time = #{regTime,jdbcType=TIMESTAMP},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?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.pica.cloud.account.account.server.mapper.AcctPatUnionMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.AcctPatUnion" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="acct_id" property="acctId" jdbcType="INTEGER" />
<result column="union_type" property="unionType" jdbcType="INTEGER" />
<result column="union_id" property="unionId" jdbcType="VARCHAR" />
<result column="delete_flag" property="deleteFlag" jdbcType="INTEGER" />
<result column="created_id" property="createdId" jdbcType="INTEGER" />
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP" />
<result column="modified_id" property="modifiedId" jdbcType="INTEGER" />
<result column="modified_time" property="modifiedTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, acct_id, union_type, union_id, delete_flag, created_id, created_time, modified_id,
modified_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from account_pat_union
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from account_pat_union
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.AcctPatUnion" >
insert into account_pat_union (id, acct_id, union_type,
union_id, delete_flag, created_id,
created_time, modified_id, modified_time
)
values (#{id,jdbcType=INTEGER}, #{acctId,jdbcType=INTEGER}, #{unionType,jdbcType=INTEGER},
#{unionId,jdbcType=VARCHAR}, #{deleteFlag,jdbcType=INTEGER}, #{createdId,jdbcType=INTEGER},
#{createdTime,jdbcType=TIMESTAMP}, #{modifiedId,jdbcType=INTEGER}, #{modifiedTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.AcctPatUnion" >
insert into account_pat_union
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="acctId != null" >
acct_id,
</if>
<if test="unionType != null" >
union_type,
</if>
<if test="unionId != null" >
union_id,
</if>
<if test="deleteFlag != null" >
delete_flag,
</if>
<if test="createdId != null" >
created_id,
</if>
<if test="createdTime != null" >
created_time,
</if>
<if test="modifiedId != null" >
modified_id,
</if>
<if test="modifiedTime != null" >
modified_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="acctId != null" >
#{acctId,jdbcType=INTEGER},
</if>
<if test="unionType != null" >
#{unionType,jdbcType=INTEGER},
</if>
<if test="unionId != null" >
#{unionId,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null" >
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createdId != null" >
#{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
#{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.AcctPatUnion" >
update account_pat_union
<set >
<if test="acctId != null" >
acct_id = #{acctId,jdbcType=INTEGER},
</if>
<if test="unionType != null" >
union_type = #{unionType,jdbcType=INTEGER},
</if>
<if test="unionId != null" >
union_id = #{unionId,jdbcType=VARCHAR},
</if>
<if test="deleteFlag != null" >
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createdId != null" >
created_id = #{createdId,jdbcType=INTEGER},
</if>
<if test="createdTime != null" >
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null" >
modified_id = #{modifiedId,jdbcType=INTEGER},
</if>
<if test="modifiedTime != null" >
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.AcctPatUnion" >
update account_pat_union
set acct_id = #{acctId,jdbcType=INTEGER},
union_type = #{unionType,jdbcType=INTEGER},
union_id = #{unionId,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
created_id = #{createdId,jdbcType=INTEGER},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=INTEGER},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册