@ -2,36 +2,25 @@
< !DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace= "cn.chjyj.employee.mapper.User Mapper" >
<mapper namespace= "cn.chjyj.szwh.mapper.Goods Mapper" >
<sql id= "column" >
id\user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
`user_islicode` varchar(255) NOT NULL COMMENT '委托方isli标识码',
`username` varchar(50) DEFAULT NULL COMMENT '委托方名称',
`goods_detail_id` int(11) NOT NULL COMMENT '商品明细ID',
`goods_islicode` varchar(255) NOT NULL COMMENT '商品isli标识码',
`islicode` varchar(200) DEFAULT NULL COMMENT 'isliCode',
`sale_count` int(11) NOT NULL DEFAULT '0' COMMENT '销售量',
`click_count` int(11) NOT NULL DEFAULT '0' COMMENT '点击量',
`is_recommend` int(1) NOT NULL DEFAULT '0' COMMENT '是否推荐;0:否;1:是',
`recommend_sort` int(10) NOT NULL DEFAULT '0' COMMENT '推荐排序',
`createtime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updatetime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
`canceltime` datetime DEFAULT NULL COMMENT '撤销时间',
`goods_status` int(1) NOT NULL DEFAULT '1' COMMENT '商品状态;1:上架中;2:下架中;3:已转让;4:已失效;5:冻结中;6:下架中',
`old_status` int(1) NOT NULL DEFAULT '0' COMMENT '是否是旧周期数据',
`entrust_status` int(1) NOT NULL DEFAULT '0' COMMENT '委托接口委托数据状态',
`apply_out` int(1) NOT NULL DEFAULT '0' COMMENT '是否申请下架;0:否;1:是',
`is_deleted` int(1) DEFAULT '0' COMMENT '删除状态;0:未删除;1:已删除',
`contract_status` int(1) NOT NULL DEFAULT '0' COMMENT '是否申请合约关联;0:失败;1:成功',
`contractual_start_time` datetime DEFAULT NULL COMMENT '委托开始时间',
`contractualtime_end_time` datetime DEFAULT NULL COMMENT '委托结束时间',
id,user_id as userId,user_islicode as userIslicode,username,goods_detail_id as goodsDetailId,goods_islicode as goodsIslicode,
islicode,sale_count as saleCount,click_count as clickCount,is_recommend as isRecommend,recommend_sort as recommendSort,createtime,updatetime,canceltime,
goods_status as goodsStatus,old_status as oldStatus,entrust_status as entrustStatus,apply_out as applyOut,is_deleted as isDelete,
contract_status as contractStatus,contractual_start_time as contractualStartTime, contractualtime_end_time as contractualtimeEndTime
</sql>
<sql id= "tbName" > goods</sql>
<!-- 分页查询商品列表 -->
<!-- <select id="getGoodsList" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.Goods"> -->
<!-- SELECT <include refid="column"/> -->
<!-- FROM <include refid=""></include> -->
<!-- </select> -->
<!-- 查询记录列表 -->
<select id= "getGoodsList" parameterType= "java.lang.Integer" resultType= "cn.chjyj.employee.bean.User" >
<select id= "getGoodsList" parameterType= "java.lang.Integer" resultType= "cn.chjyj.szwh.bean.Goods" >
select * from
<include refid= "tbName" />
order by uid DESC
@ -39,28 +28,28 @@
</select>
<!-- 根据uid查询用户 -->
<select id= "getUserByUid" parameterType= "java.lang.Integer" resultType= "cn.chjyj.employee.bean.User " >
<select id= "getUserByUid" parameterType= "java.lang.Integer" resultType= "cn.chjyj.szwh.bean.Goods " >
select <include refid= "column" />
from <include refid= "tbName" />
where uid=#{uid}
</select>
<!-- 查询用户名,加上密码 -->
<select id= "getUserByUname" parameterType= "java.lang.String" resultType= "cn.chjyj.employee.bean.User " >
<select id= "getUserByUname" parameterType= "java.lang.String" resultType= "cn.chjyj.szwh.bean.Goods " >
select <include refid= "column" /> ,password
from <include refid= "tbName" />
where uname=#{uname} limit 1;
</select>
<!-- 查询用户 -->
<select id= "getSingleUserByOpenid" parameterType= "java.lang.String" resultType= "cn.chjyj.employee.bean.User " >
<select id= "getSingleUserByOpenid" parameterType= "java.lang.String" resultType= "cn.chjyj.szwh.bean.Goods " >
select <include refid= "column" /> from
<include refid= "tbName" />
where openid=#{openid};
</select>
<!-- 新增用户 -->
<insert id= "addUser" parameterType= "cn.chjyj.employee.bean.User " useGeneratedKeys= "true" keyColumn= "uid" >
<insert id= "addUser" parameterType= "cn.chjyj.szwh.bean.Goods " useGeneratedKeys= "true" keyColumn= "uid" >
insert into <include refid= "tbName" />
(uname,password,gender,urealname,ubirth,nickname,avatarurl,platfrom,sessionkey,openid)
values (
@ -77,7 +66,7 @@
)
</insert>
<update id= "upUser" parameterType= "cn.chjyj.employee.bean.User " >
<update id= "upUser" parameterType= "cn.chjyj.szwh.bean.Goods " >
update <include refid= "tbName" />
set