Parcourir la source

tt

release_toaliyun_real
xhxu il y a 5 ans
Parent
révision
a6251f6bb3
12 fichiers modifiés avec 125 ajouts et 16 suppressions
  1. +27
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMall.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/tt/TtCoupon.java
  3. +4
    -1
      mallinkService/src/main/java/com/iformall/mapper/WxMallMapper.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/service/WxMallService.java
  5. +6
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java
  6. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java
  7. +1
    -1
      mallinkService/src/main/java/com/iformall/service/tt/TtCouponService.java
  8. +3
    -1
      mallinkService/src/main/java/com/iformall/service/tt/impl/TtCouponServiceImpl.java
  9. +52
    -4
      mallinkService/src/main/resources/mapper/WxMallMapper.xml
  10. +1
    -1
      mallinkTTAdmin/src/main/java/com/iformall/controller/base/BaseController.java
  11. +21
    -0
      mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxMallController.java
  12. +1
    -1
      mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtCouponController.java

+ 27
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMall.java Voir le fichier

@@ -160,4 +160,31 @@ public class WxMall extends TenantEntity {
}
}

@io.swagger.annotations.ApiModelProperty(value="管理员姓名",name="adminName")
@TableField(exist = false)
private Long adminId;

@io.swagger.annotations.ApiModelProperty(value="管理员姓名",name="adminName")
@TableField(exist = false)
private String adminName;

@io.swagger.annotations.ApiModelProperty(value="管理员电话",name="adminPhone")
@TableField(exist = false)
private String adminPhone;

@io.swagger.annotations.ApiModelProperty(value="管理员登陆帐号",name="adminUsername")
@TableField(exist = false)
private String adminUsername;

@io.swagger.annotations.ApiModelProperty(value="管理员登陆密码",name="adminPassword")
private String adminPassword;

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="查询-开始时间",name="startTime")
private Date startTime;

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="查询-结束时间",name="endTime")
private Date endTime;

}

+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/tt/TtCoupon.java Voir le fichier

@@ -96,7 +96,7 @@ public class TtCoupon extends TenantEntity {
private String dyTitle;
@io.swagger.annotations.ApiModelProperty(value="总库存",name="inventory")
private Integer inventory;
@io.swagger.annotations.ApiModelProperty(value="购买须知",name="remark")
@io.swagger.annotations.ApiModelProperty(value="备注",name="remark")
private String remark;
@io.swagger.annotations.ApiModelProperty(value="状态",name="status")
private Integer status;


+ 4
- 1
mallinkService/src/main/java/com/iformall/mapper/WxMallMapper.java Voir le fichier

@@ -3,6 +3,7 @@ package com.iformall.mapper;
import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxMall;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.plugin.autoTenantId.TenantInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@@ -13,7 +14,7 @@ public interface WxMallMapper extends CommonMapper<WxMall, Long> {

WxMall getByTenantId(String tenantId);

WxMall getByTenantInfo(WxMall wxMall);
WxMall getByTenantInfo(TenantEntity tenantEntity);

String queryMenusByTenantId(String tenantId);

@@ -24,4 +25,6 @@ public interface WxMallMapper extends CommonMapper<WxMall, Long> {
List<WxMall> listAsSelectMall(@Param(value = "id")Long id);

List<TenantEntity> getTenantEntitys(TenantEntity tenantEntity);

List<WxMall> findListAadmin(WxMall record);
}

+ 2
- 0
mallinkService/src/main/java/com/iformall/service/WxMallService.java Voir le fichier

@@ -84,4 +84,6 @@ public interface WxMallService {
List<WxMall> listAsSelectMall(Long id);

List<TenantEntity> getTenantEntitys(TenantEntity tenantEntity);

PageInfo<WxMall> listAadminAsPage(WxMall wxMall, Integer pageNum, Integer pageSize);
}

+ 6
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java Voir le fichier

@@ -736,9 +736,9 @@ public class WxBillAllServiceImpl implements WxBillAllService {
@Override
public void exportOweBill(WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response) {
//商场名称
WxMall q = new WxMall();
q.setTenantInfo(wxBillAll);
WxMall wxMall = wxMallMapper.getByTenantInfo(q);
// WxMall q = new WxMall();
// q.setTenantInfo(wxBillAll);
WxMall wxMall = wxMallMapper.getByTenantInfo(wxBillAll);
//映射结果
Map<String, Object> result = new HashMap<>();
result.put("mall", wxMall.getName());
@@ -900,9 +900,9 @@ public class WxBillAllServiceImpl implements WxBillAllService {
//映射结果
Map<String, Object> result = new HashMap<>();

WxMall q = new WxMall();
q.setTenantInfo(wxBillSettle);
WxMall wxMall = wxMallMapper.getByTenantInfo(q);
// WxMall q = new WxMall();
// q.setTenantInfo(wxBillSettle);
WxMall wxMall = wxMallMapper.getByTenantInfo(wxBillSettle);
result.put("mall", wxMall.getName());
result.put("merchant", wxMerchantMapper.selectById(wxBillSettle.getMerchantId()).getName());
result.put("num", wxBillSettle.getSettleNumber());


+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java Voir le fichier

@@ -253,4 +253,10 @@ public class WxMallServiceImpl implements WxMallService {
}
}

@Override
public PageInfo<WxMall> listAadminAsPage(WxMall record, Integer pageNum, Integer pageSize) {
return PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxMallMapper.findListAadmin(record));

}

}

+ 1
- 1
mallinkService/src/main/java/com/iformall/service/tt/TtCouponService.java Voir le fichier

@@ -56,7 +56,7 @@ public interface TtCouponService {

ResultData auditPass(Long id);

ResultData auditRejected(Long id);
ResultData auditRejected(Long id,String remark);


int addSeeCount(Long id);


+ 3
- 1
mallinkService/src/main/java/com/iformall/service/tt/impl/TtCouponServiceImpl.java Voir le fichier

@@ -245,13 +245,14 @@ public class TtCouponServiceImpl implements TtCouponService {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"此课程状态不在审核中");
}
byId.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_BEFOR_SHELF.getCode());
byId.setRemark("");
byId.setUpdateDate(new Date());
ttCouponMapper.updateById(byId);
return new ResultData();
}

@Override
public ResultData auditRejected(Long id) {
public ResultData auditRejected(Long id,String remark) {
TtCoupon byId = this.getById(id);
if(byId == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"未找到课程");
@@ -260,6 +261,7 @@ public class TtCouponServiceImpl implements TtCouponService {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR,"此课程状态不在审核中");
}
byId.setStatus(EnumTtCouponStatus.TTCOUPON_STATUS_REJECT.getCode());
byId.setRemark(remark);
byId.setUpdateDate(new Date());
ttCouponMapper.updateById(byId);
return new ResultData();


+ 52
- 4
mallinkService/src/main/resources/mapper/WxMallMapper.xml Voir le fichier

@@ -40,6 +40,12 @@
<result column="cash_out_limit" jdbcType="INTEGER" property="cashOutLimit"/>
<result column="alipay_app_auth_token" jdbcType="VARCHAR" property="alipayAppAuthToken"/>
<result column="alipay_member_template_id" jdbcType="VARCHAR" property="alipayMemberTemplateId"/>


<result column="admin_id" jdbcType="BIGINT" property="adminId"/>
<result column="admin_name" jdbcType="VARCHAR" property="adminName"/>
<result column="admin_phone" jdbcType="VARCHAR" property="adminPhone"/>
<result column="admin_username" jdbcType="VARCHAR" property="adminUsername"/>
</resultMap>

<sql id="allColumns">
@@ -52,7 +58,7 @@
</sql>

<sql id="dynamicWhereConditions">
where 1=1
where id &gt; 1

<if test=" null != id ">
and `id` = #{id}
@@ -151,7 +157,6 @@
<include refid="allColumns"/>
from wx_mall
<include refid="dynamicWhereConditions"/>
and id &gt; 1
</select>


@@ -170,11 +175,17 @@
from wx_mall
where `tenant_id` = #{value}
</select>
<select id="getByTenantInfo" parameterType="com.iformall.domain.po.WxMall" resultMap="BaseResultMap">
<select id="getByTenantInfo" parameterType="com.iformall.domain.po.base.TenantEntity" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_mall
<include refid="dynamicWhereConditions"/>
where 1=1
<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>
</select>

<select id="queryMenusByTenantId" parameterType="string" resultType="string">
@@ -217,4 +228,41 @@
</if>
</select>

<select id="findList" parameterType="com.iformall.domain.po.WxMall" resultMap="BaseResultMap">
select
m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`name`,m.`group`,m.`country`,m.`province`,m.`city`,m.`addr`,
m.`service_phone`,m.`valid_start`, m.`valid_end`,
mui.`id` admin_id,mui.`username` admin_username,mui.`name` admin_name,mui.`phone` admin_phone
from wx_mall m
left join mall_user_info mui on m.tenant_id = mui.tenant_id and mui.is_admin = 1
where 1=1
<if test=" null != tenantId and '' != tenantId">
and m.`tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and m.`parent_tenant_id` = #{parentTenantId}
</if>
<if test=" null != name ">
and m.`name` like concat('%', #{name},'%')
</if>

<if test=" null != startTime ">
and m.`valid_start` &gt;= #{startTime}
</if>
<if test=" null != endTime">
and m.`valid_start` &lt; #{endTime}
</if>

<if test=" null != adminName ">
and mui.`name` like concat('%', #{adminName},'%')
</if>
<if test=" null != adminPhone">
and mui.`phone` like concat('%', #{adminPhone},'%')
</if>
<if test=" null != adminUsername ">
and mui.`username` like concat('%', #{adminUsername},'%')
</if>

</select>

</mapper>

+ 1
- 1
mallinkTTAdmin/src/main/java/com/iformall/controller/base/BaseController.java Voir le fichier

@@ -143,7 +143,7 @@ public class BaseController {
info.setTenantId(info.getParentTenantId());
info.setParentTenantId(null);

if(getUser().getParentTenantId().equals(info.getTenantId())){
if(getUser().getTenantId().equals(info.getTenantId())){
return info;
}
}


+ 21
- 0
mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxMallController.java Voir le fichier

@@ -1,6 +1,9 @@
package com.iformall.controller.basic;

import com.github.pagehelper.PageInfo;
import com.iformall.annotation.SystemControllerLog;
import com.iformall.annotation.TenantIgnore;
import com.iformall.common.ErrorCode;
import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.WxMall;
@@ -19,6 +22,24 @@ public class WxMallController extends BaseController {
@Autowired
private WxMallService wxMallService;

@ApiOperation("查询商场集团列表")
@GetMapping(value = "/listAadmin")
@SystemControllerLog(description = "商场基础数据")
public ResultData getlistAadmin(@ModelAttribute WxMall wxMall, Integer pageNum, Integer pageSize) {
logger.debug("[" + getIpAddr() + "] WxProjectConfigController::getMallList");
try {
if(wxMall == null){
wxMall = new WxMall();
}
wxMall.setTenantInfo(getTenantInfo());
PageInfo<WxMall> page = wxMallService.listAadminAsPage(wxMall, pageNum, pageSize);
return new ResultData(page);
}catch (Exception e){
logger.error(e.getMessage(),e);
return new ResultData(ErrorCode.SYS_SERVER_ERROR);
}
}

@ApiOperation("根据id更新接口")
@PostMapping("update")
@SystemControllerLog(description = "商城-更新")


+ 1
- 1
mallinkTTAdmin/src/main/java/com/iformall/controller/tt/TtCouponController.java Voir le fichier

@@ -354,7 +354,7 @@ public class TtCouponController extends BaseController {
logger.error(e.getMessage());
return new ResultData(e.getErrorCode(), e.getMessage());
}
return ttCouponService.auditRejected(record.getId());
return ttCouponService.auditRejected(record.getId(),record.getRemark());
}

}

Chargement…
Annuler
Enregistrer