小程序增加租戶
This commit is contained in:
parent
539d28c944
commit
d73b6cfa32
|
|
@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.entity.SurvMaintainRecord;
|
import org.jeecg.common.entity.SurvMaintainRecord;
|
||||||
import org.jeecg.common.util.R;
|
import org.jeecg.common.util.R;
|
||||||
import org.jeecg.system.applet.service.ISurvMaintainRecordService;
|
import org.jeecg.system.applet.service.ISurvMaintainRecordService;
|
||||||
|
import org.jeecg.system.applet.util.TenantUtil;
|
||||||
import org.jeecg.system.applet.util.ThirdSessionHolder;
|
import org.jeecg.system.applet.util.ThirdSessionHolder;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
@ -49,6 +50,8 @@ public class SurvMaintainRecordController {
|
||||||
HttpServletRequest req) {
|
HttpServletRequest req) {
|
||||||
// QueryWrapper<SurvMaintainRecord> queryWrapper = QueryGenerator.initQueryWrapper(survMaintainRecord, req.getParameterMap());
|
// QueryWrapper<SurvMaintainRecord> queryWrapper = QueryGenerator.initQueryWrapper(survMaintainRecord, req.getParameterMap());
|
||||||
Page<SurvMaintainRecord> page = new Page<SurvMaintainRecord>(pageNo, pageSize);
|
Page<SurvMaintainRecord> page = new Page<SurvMaintainRecord>(pageNo, pageSize);
|
||||||
|
String tenantId = TenantUtil.getCurTenant(null);
|
||||||
|
survMaintainRecord.setTenantId(tenantId);
|
||||||
IPage<SurvMaintainRecord> pageList = survMaintainRecordService.pages(page, survMaintainRecord);
|
IPage<SurvMaintainRecord> pageList = survMaintainRecordService.pages(page, survMaintainRecord);
|
||||||
return R.ok(pageList);
|
return R.ok(pageList);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@
|
||||||
<if test="param2.farmName!=null and param2.farmName!=''">
|
<if test="param2.farmName!=null and param2.farmName!=''">
|
||||||
and FARM_NAME like concat('%',#{param2.farmName},'%')
|
and FARM_NAME like concat('%',#{param2.farmName},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param2.tenantId != null and param2.tenantId != ''">
|
||||||
|
and TENANT_ID = #{param2.tenantId}
|
||||||
|
</if>
|
||||||
order by CREATE_TIME DESC
|
order by CREATE_TIME DESC
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -43,6 +43,9 @@
|
||||||
<if test="param2.maintainTime!=null">
|
<if test="param2.maintainTime!=null">
|
||||||
and DATE_FORMAT(MAINTAIN_TIME, '%Y-%m-%d') = DATE_FORMAT(#{param2.maintainTime},'%Y-%m-%d')
|
and DATE_FORMAT(MAINTAIN_TIME, '%Y-%m-%d') = DATE_FORMAT(#{param2.maintainTime},'%Y-%m-%d')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param2.tenantId != null and param2.tenantId != ''">
|
||||||
|
and TENANT_ID = #{param2.tenantId}
|
||||||
|
</if>
|
||||||
order by MAINTAIN_TIME desc,CREATE_TIME desc
|
order by MAINTAIN_TIME desc,CREATE_TIME desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -41,5 +41,8 @@
|
||||||
<if test="param2.sampTime!=null">
|
<if test="param2.sampTime!=null">
|
||||||
and DATE_FORMAT(samp_time,'%Y-%m-%d') = DATE_FORMAT(#{param2.sampTime},'%Y-%m-%d')
|
and DATE_FORMAT(samp_time,'%Y-%m-%d') = DATE_FORMAT(#{param2.sampTime},'%Y-%m-%d')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param2.tenantId != null and param2.tenantId != ''">
|
||||||
|
and TENANT_ID = #{param2.tenantId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue