小程序增加租戶

This commit is contained in:
zhangyue 2026-07-30 17:25:17 +08:00
parent 539d28c944
commit d73b6cfa32
4 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.entity.SurvMaintainRecord;
import org.jeecg.common.util.R;
import org.jeecg.system.applet.service.ISurvMaintainRecordService;
import org.jeecg.system.applet.util.TenantUtil;
import org.jeecg.system.applet.util.ThirdSessionHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -49,6 +50,8 @@ public class SurvMaintainRecordController {
HttpServletRequest req) {
// QueryWrapper<SurvMaintainRecord> queryWrapper = QueryGenerator.initQueryWrapper(survMaintainRecord, req.getParameterMap());
Page<SurvMaintainRecord> page = new Page<SurvMaintainRecord>(pageNo, pageSize);
String tenantId = TenantUtil.getCurTenant(null);
survMaintainRecord.setTenantId(tenantId);
IPage<SurvMaintainRecord> pageList = survMaintainRecordService.pages(page, survMaintainRecord);
return R.ok(pageList);
}

View File

@ -45,6 +45,9 @@
<if test="param2.farmName!=null and param2.farmName!=''">
and FARM_NAME like concat('%',#{param2.farmName},'%')
</if>
<if test="param2.tenantId != null and param2.tenantId != ''">
and TENANT_ID = #{param2.tenantId}
</if>
order by CREATE_TIME DESC
</select>
</mapper>

View File

@ -43,6 +43,9 @@
<if test="param2.maintainTime!=null">
and DATE_FORMAT(MAINTAIN_TIME, '%Y-%m-%d') = DATE_FORMAT(#{param2.maintainTime},'%Y-%m-%d')
</if>
<if test="param2.tenantId != null and param2.tenantId != ''">
and TENANT_ID = #{param2.tenantId}
</if>
order by MAINTAIN_TIME desc,CREATE_TIME desc
</select>
</mapper>

View File

@ -41,5 +41,8 @@
<if test="param2.sampTime!=null">
and DATE_FORMAT(samp_time,'%Y-%m-%d') = DATE_FORMAT(#{param2.sampTime},'%Y-%m-%d')
</if>
<if test="param2.tenantId != null and param2.tenantId != ''">
and TENANT_ID = #{param2.tenantId}
</if>
</select>
</mapper>