diff --git a/Cpop-Core/src/main/java/com/cpop/core/strategy/login/MiniLoginStrategy.java b/Cpop-Core/src/main/java/com/cpop/core/strategy/login/MiniLoginStrategy.java index 0d4c3e6..5e24235 100644 --- a/Cpop-Core/src/main/java/com/cpop/core/strategy/login/MiniLoginStrategy.java +++ b/Cpop-Core/src/main/java/com/cpop/core/strategy/login/MiniLoginStrategy.java @@ -89,7 +89,7 @@ public class MiniLoginStrategy implements LoginStrategy { private void changeJamboxUser(MiniUserLoginInfo loginInfo, Map credentials, SourceType sourceType) { //获取品牌表 Row brand = DbChain.table("cp_sys_brand") - .select("csb.id", "csb.is_open_mall") + .select("csb.id", "csb.is_open_sharing") .from("cp_sys_brand").as("csb") .leftJoin("cp_j_brand_extend").as("cjbe").on("cjbe.brand_id = csb.id") .and("cjbe.brand_cloud_id = ?", credentials.get("brandId")) diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/WxCpPortalController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/WxCpPortalController.java index 525c598..a039d97 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/WxCpPortalController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/callback/WxCpPortalController.java @@ -2,13 +2,9 @@ package com.cpop.oam.business.controller.callback; import com.cpop.common.utils.JsonUtils; import com.cpop.common.utils.StringUtils; -import com.cpop.core.service.RedisService; -import com.cpop.core.utils.SpringUtils; import com.cpop.oam.business.service.OamWxCpService; import com.cpop.oam.framework.config.wxCp.WxCpConfiguration; -import com.cpop.oam.framework.constant.WxCpConstant; import io.swagger.annotations.Api; -import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.cp.api.WxCpService; import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage; import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/FinanceReimburseServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/FinanceReimburseServiceImpl.java index c761462..8538115 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/FinanceReimburseServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/FinanceReimburseServiceImpl.java @@ -145,14 +145,10 @@ public class FinanceReimburseServiceImpl extends ServiceImpl list = this.list(QueryWrapper.create() - .where(FINANCE_REIMBURSE.STAFF_ID.eq(loginInfo.getId())) + .where(FINANCE_REIMBURSE.STAFF_ID.eq(loginUserInfo.getString("id"))) .and(FINANCE_REIMBURSE.STATUS.ne(4))); //统计 ReimbursePersonStatisticVo vo = new ReimbursePersonStatisticVo(); diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java index 089f7de..920a6b3 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskServiceImpl.java @@ -73,8 +73,7 @@ public class TaskServiceImpl extends ServiceImpl implements Ta public Page getTaskPage(TaskPageBo bo) { PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); return this.mapper.paginateAs(pageDomain.getPageNum(),pageDomain.getPageSize(), - QueryWrapper.create() - .where(TASK.TASK_STATUS.eq(1)) + QueryWrapper.create().where(TASK.TASK_STATUS.eq(1)) .and(TASK.TASK_TYPE.eq(bo.getTaskType())) .and(TASK.TASK_RATING.eq(bo.getTaskRating())) .orderBy(TASK.EXPECTED_COMPLETION_DATE.asc()), @@ -415,18 +414,15 @@ public class TaskServiceImpl extends ServiceImpl implements Ta public TaskMonthStatisticsVo getTaskMonthStatistics(TaskMonthStatisticsBo bo) { //员工组绩点信息 List taskStaffGroups = null; - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); //读取员工信息 - RedisService redisService = SpringUtils.getBean(RedisService.class); - JSONObject cacheObject = redisService.getCacheObject(UserType.OAM_USER.getKey() + loginUser.getUsername()); - OamStaffLoginInfo loginInfo = cacheObject.getJSONObject("user").toJavaObject(OamStaffLoginInfo.class); + JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo(); QueryWrapper queryWrapper = QueryWrapper.create(); - if (Constants.SUPER_ADMIN.equals(loginUser.getUsername())) { + if (Constants.SUPER_ADMIN.equals(loginUserInfo.getString("userName"))) { //TODO:超级管理员暂时获取所有任务 } else { //查询个人涉及到的任务 TaskStaffGroupService taskStaffGroupService = SpringUtils.getBean(TaskStaffGroupService.class); - taskStaffGroups = taskStaffGroupService.list(QueryWrapper.create().where(TASK_STAFF_GROUP.STAFF_ID.eq(loginInfo.getId()))); + taskStaffGroups = taskStaffGroupService.list(QueryWrapper.create().where(TASK_STAFF_GROUP.STAFF_ID.eq(loginUserInfo.getString("id")))); if (!taskStaffGroups.isEmpty()) { queryWrapper.and(TASK.ID.in(taskStaffGroups.stream().map(TaskStaffGroup::getTaskId).collect(Collectors.toSet()))); } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StorePageBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/StorePageBo.java new file mode 100644 index 0000000..911f530 --- /dev/null +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/StorePageBo.java @@ -0,0 +1,23 @@ +/* + * @Author: DB + * @Date: 2023-11-23 15:22:53 + * @Description: 请填写简介 + */ +package com.cpop.system.business.bo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; +import java.io.Serializable; + +@Data +@Accessors(chain = true) +@ApiModel(value = "校区分页对象") +public class StorePageBo implements Serializable { + + /** + * 校区名 + */ + @ApiModelProperty("校区名") + private String name; +} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreController.java index 2050a2d..a42ab4d 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/StoreController.java @@ -1,22 +1,16 @@ package com.cpop.system.business.controller; +import com.cpop.core.base.R; +import com.cpop.system.business.bo.StorePageBo; +import com.cpop.system.business.vo.StorePageVo; import com.mybatisflex.core.paginate.Page; -import org.springframework.web.bind.annotation.DeleteMapping; +import io.swagger.annotations.ApiOperation; 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.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.beans.factory.annotation.Autowired; -import com.cpop.system.business.entity.Store; import com.cpop.system.business.service.StoreService; import org.springframework.web.bind.annotation.RestController; import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import java.io.Serializable; -import java.util.List; /** * 系统-店铺/校区表 控制层。 @@ -29,7 +23,21 @@ import java.util.List; @RequestMapping("/store") public class StoreController { - @Autowired - private StoreService storeService; + @Autowired + private StoreService storeService; + + /** + * @Description: 查询校区分页列表 + * @param bo + * @return R> + * @Author Administrator + * @Date: 2023/6/7 0007 10:18 + */ + @ApiOperation("查询校区分页列表") + @GetMapping("/getStorePage") + public R> getStorePage(StorePageBo bo) { + Page pageVo = storeService.getStorePage(bo); + return R.ok(pageVo); + } } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java index d3041af..f75a4e0 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java @@ -1,5 +1,8 @@ package com.cpop.system.business.service; +import com.cpop.system.business.bo.StorePageBo; +import com.cpop.system.business.vo.StorePageVo; +import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.service.IService; import com.cpop.system.business.entity.Store; @@ -11,4 +14,11 @@ import com.cpop.system.business.entity.Store; */ public interface StoreService extends IService { + /** + * @Author: DB + * @description: 获取校区分页列表 + * @Date: 2023-11-23 15:40:30 + * @return {*} + */ + Page getStorePage(StorePageBo bo); } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java index 4aea595..8129ceb 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java @@ -1,10 +1,26 @@ +/* + * @Author: DB + * + * @Date: 2023-10-26 18:22:22 + * + * @Description: 请填写简介 + */ package com.cpop.system.business.service.impl; -import com.mybatisflex.spring.service.impl.ServiceImpl; +import com.cpop.core.base.entity.PageDomain; +import com.cpop.core.utils.sql.SqlUtils; +import com.cpop.system.business.bo.StorePageBo; import com.cpop.system.business.entity.Store; import com.cpop.system.business.mapper.StoreMapper; import com.cpop.system.business.service.StoreService; +import com.cpop.system.business.vo.StorePageVo; +import com.mybatisflex.core.paginate.Page; +import com.mybatisflex.spring.service.impl.ServiceImpl; import org.springframework.stereotype.Service; +import com.mybatisflex.core.query.QueryWrapper; + +import static com.cpop.system.business.entity.table.BrandTableDef.BRAND; +import static com.cpop.system.business.entity.table.StoreTableDef.STORE; /** * 系统-店铺/校区表 服务层实现。 @@ -15,4 +31,18 @@ import org.springframework.stereotype.Service; @Service("storeService") public class StoreServiceImpl extends ServiceImpl implements StoreService { + /** + * @Author: DB + * @description: 获取校区分页列表 + * @Date: 2023-11-23 15:35:05 + * @return {*} + */ + @Override + public Page getStorePage(StorePageBo bo) { + PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); + return this.getMapper().paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()), + QueryWrapper.create().select(STORE.ALL_COLUMNS).select(BRAND.BRAND_NAME).from(STORE).leftJoin(BRAND) + .on(BRAND.ID.eq(STORE.BRAND_ID)), + StorePageVo.class); + } } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java new file mode 100644 index 0000000..604e552 --- /dev/null +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java @@ -0,0 +1,64 @@ +package com.cpop.system.business.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; +import java.io.Serializable; +import com.cpop.core.base.enums.SourceType; + +/* + * @Author: DB + * + * @Date: 2023-11-23 15:05:53 + * + * @Description: 店铺分页返回对象 + */ +@Data +@Accessors(chain = true) +@ApiModel(value = "校区/店铺分页返回对象") +public class StorePageVo implements Serializable { + + /** + * 店铺/校区id + */ + @ApiModelProperty("主键") + private String id; + + /** + * 云校区id + */ + @ApiModelProperty("云校区id") + private String campusCloudId; + + /** + * 品牌id + */ + @ApiModelProperty("品牌id") + private String brandId; + + /** + * 品牌名 + */ + @ApiModelProperty("品牌名") + private String brandName; + + /** + * 店铺/校区名 + */ + @ApiModelProperty("店铺/校区名") + private String storeName; + + /** + * 地址 + */ + @ApiModelProperty("地址") + private String address; + + /** + * 数据来源 + */ + @ApiModelProperty("数据来源") + private SourceType sourceType; + +}