查询问题

This commit is contained in:
2025-12-18 14:10:44 +08:00
parent af3abe6dfb
commit 6547768b34
3 changed files with 9 additions and 11 deletions

View File

@@ -34,7 +34,7 @@ public class SysRoleTemplateServiceImpl extends ServiceImpl<SysRoleTemplateMappe
SysRoleTemplate roleTemplate = BeanUtil.copyProperties(dto, SysRoleTemplate.class, "roleIdList");
roleTemplate.setOpUser(StpKit.USER.getAccount());
if (roleTemplate.getPid() != null) {
SysRole sysRole = new SysRole().setName(roleTemplate.getName()).setCreateUserId(StpKit.USER.getLoginIdAsLong());
SysRole sysRole = new SysRole().setName(roleTemplate.getName()).setCreateUserId(StpKit.USER.getShopId());
roleService.save(sysRole);
roleTemplate.setRoleId(sysRole.getId());
}

View File

@@ -6,6 +6,7 @@ import com.czg.order.vo.GbOrderDetailVO;
import com.czg.order.vo.GbOrderUserVO;
import com.mybatisflex.core.BaseMapper;
import com.czg.order.entity.GbOrder;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -17,9 +18,9 @@ import java.util.List;
*/
public interface GbOrderMapper extends BaseMapper<GbOrder> {
GbOrderCountVO countOrder(GbOrderQueryParam param);
GbOrderCountVO countOrder(@Param("param") GbOrderQueryParam param);
List<GbOrderDetailVO> getGbOrderPage(GbOrderQueryParam param, Long shopId, Long mainShopId);
List<GbOrderDetailVO> getGbOrderPage(@Param("param")GbOrderQueryParam param, Long shopId, Long mainShopId);
GbOrderDetailVO getDetailByDetailId(Long mainShopId, Long shopId, Long detailId);

View File

@@ -20,13 +20,11 @@
<if test="param.groupOrderNo != null">
AND detail.group_order_no = #{param.groupOrderNo}
</if>
<if test="param.status != null">
<if test="param.status == '退款'">
AND (detail.STATUS = '退款中' or detail.STATUS = '已退款')
</if>
<if test="param.status != '退款'">
AND detail.STATUS = #{param.status}
</if>
<if test='param.status == "退款"'>
AND (detail.STATUS = '退款中' or detail.STATUS = '退款')
</if>
<if test='param.status != "退款"'>
AND detail.STATUS = #{param.status}
</if>
<if test="param.userId != null">
AND detail.user_id = #{param.userId}
@@ -37,7 +35,6 @@
<if test="param.verifyStartTime != null and param.verifyEndTime != null ">
and detail.verify_time BETWEEN #{param.verifyStartTime} and #{param.verifyEndTime}
</if>
order by detail.create_time desc
</select>
<select id="getGbOrderPage" resultType="com.czg.order.vo.GbOrderDetailVO">