Commit de9f9c98 by YG8999

保洁记录

parent 33a89f09
...@@ -90,7 +90,8 @@ public class SCleanRecordsController extends BaseController ...@@ -90,7 +90,8 @@ public class SCleanRecordsController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id)
{ {
return success(sCleanRecordsService.selectSCleanRecordsById(id)); SCleanRecords sCleanRecords = sCleanRecordsService.selectSCleanRecordsById(id);
return success(sCleanRecords);
} }
/** /**
......
...@@ -14,4 +14,7 @@ public interface WechatPayInfoService extends IService<WechatPayInfo> { ...@@ -14,4 +14,7 @@ public interface WechatPayInfoService extends IService<WechatPayInfo> {
* @return WechatPayInfo * @return WechatPayInfo
*/ */
WechatPayInfo getByNo(String outTradeNo); WechatPayInfo getByNo(String outTradeNo);
} }
\ No newline at end of file
...@@ -50,7 +50,14 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService ...@@ -50,7 +50,14 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService
@Override @Override
public SCleanRecords selectSCleanRecordsById(Long id) public SCleanRecords selectSCleanRecordsById(Long id)
{ {
return sCleanRecordsMapper.selectSCleanRecordsById(id); SCleanRecords sCleanRecords = sCleanRecordsMapper.selectSCleanRecordsById(id);
if (sCleanRecords != null) {
SStore store = sStoreMapper.selectSStoreById(sCleanRecords.getStoreId());
SRoom room = sRoomMapper.selectSRoomById(sCleanRecords.getRoomId());
sCleanRecords.setsStore(store);
sCleanRecords.setsRoom(room);
}
return sCleanRecords;
} }
/** /**
......
...@@ -68,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -68,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where t1.status = 0 and where t1.status = 0 and
t1.store_id in (select store_id from s_store_consumer where consumer_id = #{consumerId}) t1.store_id in (select store_id from s_store_consumer where consumer_id = #{consumerId})
<if test="storeName != null and storeName != ''"> and t2.name = #{storeName}</if> <if test="storeName != null and storeName != ''"> and t2.name = #{storeName}</if>
order by update_time, create_time desc
</select> </select>
<select id="myCleanList" parameterType="SCleanRecords" resultMap="SCleanRecordsResult"> <select id="myCleanList" parameterType="SCleanRecords" resultMap="SCleanRecordsResult">
...@@ -83,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -83,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where t1.consumer_id = #{consumerId} where t1.consumer_id = #{consumerId}
<if test="status != null "> and t1.status = #{status}</if> <if test="status != null "> and t1.status = #{status}</if>
<if test="storeName != null and storeName != ''"> and t2.name = #{storeName}</if> <if test="storeName != null and storeName != ''"> and t2.name = #{storeName}</if>
order by update_time, create_time desc
</select> </select>
<insert id="insertSCleanRecords" parameterType="SCleanRecords" useGeneratedKeys="true" keyProperty="id"> <insert id="insertSCleanRecords" parameterType="SCleanRecords" useGeneratedKeys="true" keyProperty="id">
......
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