bug 5911
This commit is contained in:
parent
f4402c8d34
commit
6af64d586b
|
|
@ -19,9 +19,6 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
|||
public class AllocCanteenSuggestion extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键自增 */
|
||||
private Long id;
|
||||
|
||||
/** 投诉建议id */
|
||||
@Excel(name = "投诉建议id")
|
||||
@ApiModelProperty(value = "投诉建议id")
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
package com.bonus.canteen.core.alloc.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.canteen.core.nutrition.common.enums.YesOrNoEnum;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.alloc.mapper.AllocCanteenSuggestionMapper;
|
||||
|
|
@ -51,6 +54,10 @@ public class AllocCanteenSuggestionServiceImpl implements IAllocCanteenSuggestio
|
|||
@Override
|
||||
public int insertAllocCanteenSuggestion(AllocCanteenSuggestion allocCanteenSuggestion) {
|
||||
allocCanteenSuggestion.setCreateTime(DateUtils.getNowDate());
|
||||
allocCanteenSuggestion.setCreateBy(SecurityUtils.getUsername());
|
||||
allocCanteenSuggestion.setUserId(SecurityUtils.getUserId());
|
||||
allocCanteenSuggestion.setSourceType(7L);
|
||||
allocCanteenSuggestion.setReplyState(YesOrNoEnum.NO.key().longValue());
|
||||
try {
|
||||
return allocCanteenSuggestionMapper.insertAllocCanteenSuggestion(allocCanteenSuggestion);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -67,6 +74,7 @@ public class AllocCanteenSuggestionServiceImpl implements IAllocCanteenSuggestio
|
|||
@Override
|
||||
public int updateAllocCanteenSuggestion(AllocCanteenSuggestion allocCanteenSuggestion) {
|
||||
allocCanteenSuggestion.setUpdateTime(DateUtils.getNowDate());
|
||||
allocCanteenSuggestion.setUpdateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
return allocCanteenSuggestionMapper.updateAllocCanteenSuggestion(allocCanteenSuggestion);
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.canteen.core.alloc.mapper.AllocCanteenSuggestionMapper">
|
||||
<resultMap type="com.bonus.canteen.core.alloc.domain.AllocCanteenSuggestion" id="AllocCanteenSuggestionResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="complaintId" column="complaint_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="content" column="content" />
|
||||
|
|
@ -22,7 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectAllocCanteenSuggestionVo">
|
||||
select id, complaint_id, user_id, content, canteen_id, complaint_picture, source_type, mobile, reply_content, revision, reply_state, create_by, create_time, update_by, update_time from alloc_canteen_suggestion
|
||||
select complaint_id, user_id, content, canteen_id, complaint_picture, source_type, mobile,
|
||||
reply_content, revision, reply_state, create_by, create_time, update_by, update_time
|
||||
from alloc_canteen_suggestion
|
||||
</sql>
|
||||
|
||||
<select id="selectAllocCanteenSuggestionList" parameterType="com.bonus.canteen.core.alloc.domain.AllocCanteenSuggestion" resultMap="AllocCanteenSuggestionResult">
|
||||
|
|
@ -43,13 +44,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectAllocCanteenSuggestionById" parameterType="Long" resultMap="AllocCanteenSuggestionResult">
|
||||
<include refid="selectAllocCanteenSuggestionVo"/>
|
||||
where id = #{id}
|
||||
where complaint_id = #{complaintId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAllocCanteenSuggestion" parameterType="com.bonus.canteen.core.alloc.domain.AllocCanteenSuggestion" useGeneratedKeys="true" keyProperty="id">
|
||||
<insert id="insertAllocCanteenSuggestion" parameterType="com.bonus.canteen.core.alloc.domain.AllocCanteenSuggestion" useGeneratedKeys="true" keyProperty="complaintId">
|
||||
insert into alloc_canteen_suggestion
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="complaintId != null">complaint_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="canteenId != null">canteen_id,</if>
|
||||
|
|
@ -65,7 +65,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="complaintId != null">#{complaintId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="canteenId != null">#{canteenId},</if>
|
||||
|
|
@ -85,7 +84,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<update id="updateAllocCanteenSuggestion" parameterType="com.bonus.canteen.core.alloc.domain.AllocCanteenSuggestion">
|
||||
update alloc_canteen_suggestion
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="complaintId != null">complaint_id = #{complaintId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
<if test="canteenId != null">canteen_id = #{canteenId},</if>
|
||||
|
|
@ -100,17 +98,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
where complaint_id = #{complaintId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAllocCanteenSuggestionById" parameterType="Long">
|
||||
delete from alloc_canteen_suggestion where id = #{id}
|
||||
delete from alloc_canteen_suggestion where complaint_id = #{complaintId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAllocCanteenSuggestionByIds" parameterType="String">
|
||||
delete from alloc_canteen_suggestion where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
delete from alloc_canteen_suggestion where complaint_id in
|
||||
<foreach item="complaintId" collection="array" open="(" separator="," close=")">
|
||||
#{complaintId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue