@@ -44,5 +44,6 @@ public interface WorkMapper extends IBaseMapper<WorkEntity, Long> {
@Delete("delete from tb_work where is_delete=0 and status=0 and DATE_FORMAT( create_time, '%Y%m' ) <= DATE_FORMAT(#{now} , '%Y%m' )")
void delByTime(String now);
- void insertWork(@Param("work") WorkEntity param);
+// void insertWork(@Param("work") WorkEntity param);
+ void insertWork(WorkEntity param);
}
@@ -4,12 +4,12 @@
<insert id="insertWork" parameterType="com.gis.domain.entity.WorkEntity">
- <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="work.id">
+ <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tb_work (id, create_time, update_time, user_id, status)
values
- (#{work.id}, #{work.createTime}, #{work.updateTime}, #{work.userId}, #{work.status})
+ (#{id}, #{createTime}, #{updateTime}, #{userId}, #{status})
</insert>
</mapper>