工单模块
This commit is contained in:
@@ -6,6 +6,7 @@ import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -16,6 +17,7 @@ import org.xyzh.common.core.page.PageRequest;
|
||||
import org.xyzh.common.dto.sys.TbGuestDTO;
|
||||
import org.xyzh.common.utils.validation.ValidationUtils;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
@@ -63,6 +65,11 @@ public class GuestController {
|
||||
return guestService.deleteGuest(userId);
|
||||
}
|
||||
|
||||
@GetMapping("/wechat/{wechatId}")
|
||||
public ResultDomain<TbGuestDTO> selectGuestByWechat(@PathVariable("wechatId") @NotBlank String wechatId){
|
||||
return guestService.selectGuestByWechatId(wechatId);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/list")
|
||||
public ResultDomain<TbGuestDTO> listGuest(TbGuestDTO filter) {
|
||||
|
||||
@@ -50,6 +50,14 @@ public interface TbGuestMapper extends BaseMapper<TbGuestDTO>{
|
||||
*/
|
||||
TbGuestDTO selectGuestOne(TbGuestDTO guest);
|
||||
|
||||
/**
|
||||
* @description 根据微信id查询来客
|
||||
* @param wechatId
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
TbGuestDTO selectGuestByWechatId(String wechatId);
|
||||
|
||||
/**
|
||||
* @description 查询来客列表
|
||||
* @param guest 来客信息
|
||||
|
||||
@@ -49,21 +49,31 @@ public class GuestServiceImpl implements GuestService{
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ResultDomain<TbGuestDTO> deleteGuest(String userId) {
|
||||
guestMapper.deleteGuest(userId);
|
||||
return ResultDomain.success("删除成功");
|
||||
int rows = guestMapper.deleteGuest(userId);
|
||||
if (rows > 0) {
|
||||
return ResultDomain.success("删除成功");
|
||||
}
|
||||
return ResultDomain.failure("删除失败,来客不存在");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbGuestDTO> selectGuestList(TbGuestDTO guest) {
|
||||
guestMapper.selectGuestList(guest);
|
||||
return ResultDomain.success("查询成功",guest);
|
||||
List<TbGuestDTO> list = guestMapper.selectGuestList(guest);
|
||||
return ResultDomain.success("查询成功", list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbGuestDTO> selectGuestOne(TbGuestDTO guest) {
|
||||
guestMapper.selectGuestOne(guest);
|
||||
return ResultDomain.success("查询成功",guest);
|
||||
TbGuestDTO selected = guestMapper.selectGuestOne(guest);
|
||||
return ResultDomain.success("查询成功",selected);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultDomain<TbGuestDTO> selectGuestByWechatId(String wechatId){
|
||||
TbGuestDTO selected = guestMapper.selectGuestByWechatId(wechatId);
|
||||
return ResultDomain.success("查询成功", selected);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<result column="config_type" property="configType" jdbcType="VARCHAR"/>
|
||||
<result column="render_type" property="renderType" jdbcType="VARCHAR"/>
|
||||
<result column="description" property="description" jdbcType="VARCHAR"/>
|
||||
<result column="re" property="re" typeHandler="org.xyzh.common.utils.json.FastJson2TypeHandler"/>
|
||||
<result column="options" property="options" typeHandler="org.xyzh.common.utils.json.FastJson2TypeHandler"/>
|
||||
<result column="re" property="re" typeHandler="org.xyzh.common.jdbc.handler.FastJson2TypeHandler"/>
|
||||
<result column="options" property="options" typeHandler="org.xyzh.common.jdbc.handler.FastJson2TypeHandler"/>
|
||||
<result column="group" property="group" jdbcType="VARCHAR"/>
|
||||
<result column="module_id" property="moduleId" jdbcType="VARCHAR"/>
|
||||
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||
@@ -37,8 +37,8 @@
|
||||
<result column="config_type" property="configType" jdbcType="VARCHAR"/>
|
||||
<result column="render_type" property="renderType" jdbcType="VARCHAR"/>
|
||||
<result column="description" property="description" jdbcType="VARCHAR"/>
|
||||
<result column="re" property="re" typeHandler="org.xyzh.common.utils.json.FastJson2TypeHandler"/>
|
||||
<result column="options" property="options" typeHandler="org.xyzh.common.utils.json.FastJson2TypeHandler"/>
|
||||
<result column="re" property="re" typeHandler="org.xyzh.common.jdbc.handler.FastJson2TypeHandler"/>
|
||||
<result column="options" property="options" typeHandler="org.xyzh.common.jdbc.handler.FastJson2TypeHandler"/>
|
||||
<result column="group" property="group" jdbcType="VARCHAR"/>
|
||||
<result column="module_id" property="moduleId" jdbcType="VARCHAR"/>
|
||||
<result column="order_num" property="orderNum" jdbcType="INTEGER"/>
|
||||
|
||||
@@ -74,11 +74,16 @@
|
||||
<if test="wechatId != null and wechatId != ''">
|
||||
AND wechat_id = #{wechatId}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="selectGuestByWechatId">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM sys.tb_guest
|
||||
WHERE wechat_id = #{wechat_id}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="selectGuestList" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
|
||||
Reference in New Issue
Block a user