Commit be47a2c6 by Suvalue

数据返回去除CREATEID,CREATEDATE,STATE

parent 8fee76c3
......@@ -3,7 +3,9 @@ package com.bsoft.api.controller;
import com.bsoft.api.common.Result;
import com.bsoft.api.common.annotations.CurrentUser;
import com.bsoft.api.common.annotations.Token;
import com.bsoft.api.model.SysRole;
import com.bsoft.api.model.SysUser;
import com.bsoft.api.model.respmodel.SysMenuList;
import com.bsoft.api.service.SysMenuService;
import com.bsoft.api.service.SysUserRoleRsService;
import io.swagger.annotations.Api;
......@@ -12,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
@Api(tags = "用户API",produces="produces",consumes="consumes",protocols="protocols")
@RequestMapping("/user")
......@@ -39,7 +43,8 @@ public class UserController {
@Token
@ApiOperation("查询用户角色")
public Object getRoleListByUser(@ApiIgnore@CurrentUser Long userId)throws Exception{
return Result.success(sysUserRoleRsService.getRoleListByUser(userId));
List<SysRole> sysRoleList = sysUserRoleRsService.getRoleListByUser(userId);
return Result.success(sysRoleList);
}
/**
......@@ -51,6 +56,7 @@ public class UserController {
@Token
@ApiOperation("查询用户菜单")
public Object getMenuByUser(@ApiIgnore@CurrentUser Long userId)throws Exception{
return Result.success(sysMenuService.getMenu(userId));
List<SysMenuList> sysMenuList = sysMenuService.getMenu(userId);
return Result.success(sysMenuList);
}
}
......@@ -5,12 +5,6 @@ import java.util.Date;
public class DicDim {
private Long id;
private Date createDate;
private Long createUserid;
private Short state;
private String dimName;
private String dimField;
......@@ -25,30 +19,6 @@ public class DicDim {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getCreateUserid() {
return createUserid;
}
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public String getDimName() {
return dimName;
}
......
......@@ -5,12 +5,6 @@ import java.util.Date;
public class DicOrg {
private Long id;
private Date createDate;
private Long createUserid;
private Short state;
private String orgCode;
private String orgName;
......@@ -35,30 +29,6 @@ public class DicOrg {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getCreateUserid() {
return createUserid;
}
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public String getOrgCode() {
return orgCode;
}
......
......@@ -6,12 +6,6 @@ import java.util.Date;
public class SerDisease {
private BigDecimal id;
private Date createDate;
private BigDecimal createUserid;
private BigDecimal state;
private String mdcCode;
private String mdcName;
......@@ -36,30 +30,6 @@ public class SerDisease {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public BigDecimal getCreateUserid() {
return createUserid;
}
public void setCreateUserid(BigDecimal createUserid) {
this.createUserid = createUserid;
}
public BigDecimal getState() {
return state;
}
public void setState(BigDecimal state) {
this.state = state;
}
public String getMdcCode() {
return mdcCode;
}
......
......@@ -5,12 +5,6 @@ import java.util.Date;
public class SysMenu {
private Long id;
private Date createData;
private Long createUserid;
private Short state;
private Long projectId;
private String menuName;
......@@ -29,30 +23,6 @@ public class SysMenu {
this.id = id;
}
public Date getCreateData() {
return createData;
}
public void setCreateData(Date createData) {
this.createData = createData;
}
public Long getCreateUserid() {
return createUserid;
}
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public Long getProjectId() {
return projectId;
}
......
......@@ -17,35 +17,35 @@ public class SysUser {
@ApiModelProperty("用户ID")
private Long id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.CREATE_DATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
@ApiModelProperty("创建时间")
private Date createDate;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.CREATE_USERID
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
@ApiModelProperty("创建人ID")
private Long createUserid;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column LL.SYS_USER.STATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
@ApiModelProperty("状态(1=启用/0=禁用)")
private Short state;
// /**
// *
// * This field was generated by MyBatis Generator.
// * This field corresponds to the database column LL.SYS_USER.CREATE_DATE
// *
// * @mbggenerated Tue Oct 22 14:44:12 CST 2019
// */
// @ApiModelProperty("创建时间")
// private Date createDate;
//
// /**
// *
// * This field was generated by MyBatis Generator.
// * This field corresponds to the database column LL.SYS_USER.CREATE_USERID
// *
// * @mbggenerated Tue Oct 22 14:44:12 CST 2019
// */
// @ApiModelProperty("创建人ID")
// private Long createUserid;
//
// /**
// *
// * This field was generated by MyBatis Generator.
// * This field corresponds to the database column LL.SYS_USER.STATE
// *
// * @mbggenerated Tue Oct 22 14:44:12 CST 2019
// */
// @ApiModelProperty("状态(1=启用/0=禁用)")
// private Short state;
/**
*
......@@ -187,69 +187,69 @@ public class SysUser {
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Date getCreateDate() {
return createDate;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.CREATE_DATE
*
* @param createDate the value for LL.SYS_USER.CREATE_DATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.CREATE_USERID
*
* @return the value of LL.SYS_USER.CREATE_USERID
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Long getCreateUserid() {
return createUserid;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.CREATE_USERID
*
* @param createUserid the value for LL.SYS_USER.CREATE_USERID
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column LL.SYS_USER.STATE
*
* @return the value of LL.SYS_USER.STATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public Short getState() {
return state;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column LL.SYS_USER.STATE
*
* @param state the value for LL.SYS_USER.STATE
*
* @mbggenerated Tue Oct 22 14:44:12 CST 2019
*/
public void setState(Short state) {
this.state = state;
}
// public Date getCreateDate() {
// return createDate;
// }
//
// /**
// * This method was generated by MyBatis Generator.
// * This method sets the value of the database column LL.SYS_USER.CREATE_DATE
// *
// * @param createDate the value for LL.SYS_USER.CREATE_DATE
// *
// * @mbggenerated Tue Oct 22 14:44:12 CST 2019
// */
// public void setCreateDate(Date createDate) {
// this.createDate = createDate;
// }
//
// /**
// * This method was generated by MyBatis Generator.
// * This method returns the value of the database column LL.SYS_USER.CREATE_USERID
// *
// * @return the value of LL.SYS_USER.CREATE_USERID
// *
// * @mbggenerated Tue Oct 22 14:44:12 CST 2019
// */
// public Long getCreateUserid() {
// return createUserid;
// }
//
// /**
// * This method was generated by MyBatis Generator.
// * This method sets the value of the database column LL.SYS_USER.CREATE_USERID
// *
// * @param createUserid the value for LL.SYS_USER.CREATE_USERID
// *
// * @mbggenerated Tue Oct 22 14:44:12 CST 2019
// */
// public void setCreateUserid(Long createUserid) {
// this.createUserid = createUserid;
// }
//
// /**
// * This method was generated by MyBatis Generator.
// * This method returns the value of the database column LL.SYS_USER.STATE
// *
// * @return the value of LL.SYS_USER.STATE
// *
// * @mbggenerated Tue Oct 22 14:44:12 CST 2019
// */
// public Short getState() {
// return state;
// }
//
// /**
// * This method was generated by MyBatis Generator.
// * This method sets the value of the database column LL.SYS_USER.STATE
// *
// * @param state the value for LL.SYS_USER.STATE
// *
// * @mbggenerated Tue Oct 22 14:44:12 CST 2019
// */
// public void setState(Short state) {
// this.state = state;
// }
/**
* This method was generated by MyBatis Generator.
......
......@@ -5,12 +5,6 @@ import java.util.Date;
public class SysUserRoleRs {
private Long id;
private Date createDate;
private Long createUserid;
private Short state;
private Long userId;
private Long roleId;
......@@ -23,30 +17,6 @@ public class SysUserRoleRs {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getCreateUserid() {
return createUserid;
}
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public Long getUserId() {
return userId;
}
......
......@@ -9,6 +9,8 @@ public class DimValue {
private List<SerDimValue> dimValues;
public DicDim getDicDim() {
return dicDim;
}
......
......@@ -6,7 +6,6 @@ import java.util.List;
public class DiseaseLevel {
private BigDecimal id;
private BigDecimal state;
private String mdcCode;
private String mdcName;
private BigDecimal date;
......@@ -25,14 +24,6 @@ public class DiseaseLevel {
this.id = id;
}
public BigDecimal getState() {
return state;
}
public void setState(BigDecimal state) {
this.state = state;
}
public String getMdcCode() {
return mdcCode;
}
......
......@@ -3,6 +3,7 @@ package com.bsoft.api.service.Impl;
import com.bsoft.api.common.utils.TokenUtil;
import com.bsoft.api.mapper.DicOrgMapper;
import com.bsoft.api.mapper.SysUserMapper;
import com.bsoft.api.model.DicOrg;
import com.bsoft.api.model.SysUser;
import com.bsoft.api.service.LoginService;
import com.bsoft.api.service.UserService;
......@@ -12,6 +13,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.lang.annotation.Retention;
import java.util.Date;
import java.util.List;
@Service
......@@ -42,7 +44,8 @@ public class LoginServiceImpl implements LoginService {
loginInfo.setToken(token);
loginInfo.setUser(user);
//查询用户机构
loginInfo.setOrg(dicOrgMapper.selectByUser(user.getId()));
List<DicOrg> orgList =dicOrgMapper.selectByUser(user.getId());
loginInfo.setOrg(orgList);
}
return loginInfo;
}
......
......@@ -44,7 +44,6 @@ public class SerDiseaseServiceImpl implements SerDiseaseService {
diseaseLevel1.setOrgId(serDiseases.getOrgId());
diseaseLevel1.setOrgName(serDiseases.getOrgName());
diseaseLevel1.setParentId(serDiseases.getParentId());
diseaseLevel1.setState(serDiseases.getState());
diseaseLevelList.add(diseaseLevel1);
}
if(diseaseLevel!=null){
......
......@@ -3,9 +3,6 @@
<mapper namespace="com.bsoft.api.mapper.DicDimMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.DicDim">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="DIM_NAME" jdbcType="VARCHAR" property="dimName" />
<result column="DIM_FIELD" jdbcType="VARCHAR" property="dimField" />
<result column="DIM_TYPE" jdbcType="DECIMAL" property="dimType" />
......@@ -19,16 +16,14 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_DIC_DIM_ID.nextval from dual
</selectKey>
insert into LL.DIC_DIM (CREATE_DATE, CREATE_USERID, STATE,
insert into LL.DIC_DIM (
DIM_NAME, DIM_FIELD,DIM_TYPE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
values (
#{dimName,jdbcType=VARCHAR}, #{dimField,jdbcType=VARCHAR},#{dimType,jdbcType=DECIMAL})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicDim">
update LL.DIC_DIM
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
set
DIM_NAME = #{dimName,jdbcType=VARCHAR},
DIM_FIELD = #{dimField,jdbcType=VARCHAR},
DIM_TYPE=#{dimType,jdbcType=DECIMAL}
......
......@@ -3,9 +3,6 @@
<mapper namespace="com.bsoft.api.mapper.DicOrgMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.DicOrg">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="ORG_CODE" jdbcType="VARCHAR" property="orgCode" />
<result column="ORG_NAME" jdbcType="VARCHAR" property="orgName" />
<result column="ORG_NO" jdbcType="VARCHAR" property="orgNo" />
......
......@@ -3,9 +3,6 @@
<mapper namespace="com.bsoft.api.mapper.SerDiseaseMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDisease">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="MDC_CODE" jdbcType="VARCHAR" property="mdcCode" />
<result column="MDC_NAME" jdbcType="VARCHAR" property="mdcName" />
<result column="DATE" jdbcType="DECIMAL" property="date" />
......@@ -36,20 +33,18 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_DISEASE_ID.nextval from dual
</selectKey>
insert into LL.SER_DISEASE (CREATE_DATE, CREATE_USERID, STATE,
insert into LL.SER_DISEASE (
MDC_CODE, MDC_NAME, DATE,
MDC_NUM, PARENT_ID, LEVEL,
ORG_ID, ORG_NAME)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
values (
#{mdcCode,jdbcType=VARCHAR}, #{mdcName,jdbcType=VARCHAR}, #{date,jdbcType=DECIMAL},
#{mdcNum,jdbcType=DECIMAL}, #{parentId,jdbcType=DECIMAL}, #{level,jdbcType=DECIMAL},
#{orgId,jdbcType=DECIMAL}, #{orgName,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDisease">
update LL.SER_DISEASE
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
set
MDC_CODE = #{mdcCode,jdbcType=VARCHAR},
MDC_NAME = #{mdcName,jdbcType=VARCHAR},
DATE = #{date,jdbcType=DECIMAL},
......
......@@ -3,9 +3,6 @@
<mapper namespace="com.bsoft.api.mapper.SysMenuMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysMenu">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATA" jdbcType="TIMESTAMP" property="createData" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="MENU_NAME" jdbcType="VARCHAR" property="menuName" />
<result column="MENU_URL" jdbcType="VARCHAR" property="menuUrl" />
<result column="MENU_IMAGE" jdbcType="VARCHAR" property="menuImage" />
......@@ -20,10 +17,10 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_SYS_MENU_ID.nextval from dual
</selectKey>
insert into LL.SYS_MENU (CREATE_DATA, CREATE_USERID, STATE,
insert into LL.SYS_MENU (
MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID)
values (#{createData,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
values (
#{menuName,jdbcType=VARCHAR}, #{menuUrl,jdbcType=VARCHAR}, #{menuImage,jdbcType=VARCHAR},
values (#{createData,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{menuName,jdbcType=VARCHAR}, #{menuUrl,jdbcType=VARCHAR}, #{menuImage,jdbcType=VARCHAR},
......@@ -31,9 +28,7 @@
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysMenu">
update LL.SYS_MENU
set CREATE_DATA = #{createData,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
set
MENU_NAME = #{menuName,jdbcType=VARCHAR},
MENU_URL = #{menuUrl,jdbcType=VARCHAR},
MENU_IMAGE = #{menuImage,jdbcType=VARCHAR},
......@@ -41,16 +36,16 @@
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATA, CREATE_USERID, STATE, MENU_NAME, MENU_URL, MENU_IMAGE, PARENT_ID
select ID,MENU_NAME, MENU_URL, MENU_IMAGE, PARENT_ID
from LL.SYS_MENU
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATA, CREATE_USERID, STATE, MENU_NAME, MENU_URL, MENU_IMAGE, PARENT_ID
select ID,MENU_NAME, MENU_URL, MENU_IMAGE, PARENT_ID
from LL.SYS_MENU
</select>
<select id="selectMenuByUser" resultMap="sysMenuResultMap">
select DISTINCT m.ID,m.CREATE_DATA,m.CREATE_USERID,m.STATE,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID
from
SYS_ROLE_MENU_RS rmr
LEFT JOIN
......@@ -61,7 +56,7 @@
union
select DISTINCT m.ID,m.CREATE_DATA,m.CREATE_USERID,m.STATE,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID
from
SYS_USER_MENU_RS umr
LEFT JOIN
......
......@@ -3,9 +3,9 @@
<mapper namespace="com.bsoft.api.mapper.SysUserMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUser">
<id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state"/>
<!-- <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>-->
<!-- <result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>-->
<!-- <result column="STATE" jdbcType="DECIMAL" property="state"/>-->
<result column="USER_CODE" jdbcType="VARCHAR" property="userCode"/>
<result column="USER_NAME" jdbcType="VARCHAR" property="userName"/>
<result column="PASSWORD" jdbcType="VARCHAR" property="password"/>
......@@ -26,12 +26,12 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_SYS_USER_ID.nextval from dual
</selectKey>
insert into LL.SYS_USER (CREATE_DATE, CREATE_USERID, STATE,
insert into LL.SYS_USER (
USER_CODE, USER_NAME, PASSWORD,
IDCARD, SEX, MOBILE,
PAGE_COUNT, ERROR_COUNT, ERROR_TIME,
LAST_TIME, LAST_IP)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
values (
#{userCode,jdbcType=VARCHAR}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{idcard,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR},
#{pageCount,jdbcType=DECIMAL}, #{errorCount,jdbcType=DECIMAL}, #{errorTime,jdbcType=TIMESTAMP},
......@@ -39,9 +39,7 @@
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUser">
update LL.SYS_USER
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
set
USER_CODE = #{userCode,jdbcType=VARCHAR},
USER_NAME = #{userName,jdbcType=VARCHAR},
PASSWORD = #{password,jdbcType=VARCHAR},
......
......@@ -3,9 +3,6 @@
<mapper namespace="com.bsoft.api.mapper.SysUserRoleRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysUserRoleRs">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="USER_ID" jdbcType="DECIMAL" property="userId" />
<result column="ROLE_ID" jdbcType="DECIMAL" property="roleId" />
</resultMap>
......@@ -17,31 +14,29 @@
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_SYS_USER_ROLE_RS_ID.nextval from dual
</selectKey>
insert into LL.SYS_USER_ROLE_RS (CREATE_DATE, CREATE_USERID, STATE,
insert into LL.SYS_USER_ROLE_RS (
USER_ID, ROLE_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
values (
#{userId,jdbcType=DECIMAL}, #{roleId,jdbcType=DECIMAL})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysUserRoleRs">
update LL.SYS_USER_ROLE_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
set
USER_ID = #{userId,jdbcType=DECIMAL},
ROLE_ID = #{roleId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, USER_ID, ROLE_ID
select ID,USER_ID, ROLE_ID
from LL.SYS_USER_ROLE_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, USER_ID, ROLE_ID
select ID,USER_ID, ROLE_ID
from LL.SYS_USER_ROLE_RS
</select>
<select id="selectRoleByUser" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, USER_ID, ROLE_ID
select ID,USER_ID, ROLE_ID
from LL.SYS_USER_ROLE_RS
where USER_ID=#{userId,jdbcType=DECIMAL}
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment