|
|
|
@@ -7,11 +7,14 @@ import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.controller.base.BaseController; |
|
|
|
import com.iformall.domain.po.TtGoodsCategory; |
|
|
|
import com.iformall.domain.po.WxMall; |
|
|
|
import com.iformall.domain.vo.TtMallGoodsCategoryVo; |
|
|
|
import com.iformall.service.TtGoodsCategoryService; |
|
|
|
import com.iformall.service.TtMallGoodsCategoryService; |
|
|
|
import com.iformall.service.WxMallService; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -29,16 +32,24 @@ public class TtMallGoodsCategoryController extends BaseController { |
|
|
|
@Autowired |
|
|
|
private TtMallGoodsCategoryService ttMallGoodsCategoryService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxMallService wxMallService; |
|
|
|
|
|
|
|
|
|
|
|
@TenantIgnore |
|
|
|
@ApiOperation("分页列表接口") |
|
|
|
@GetMapping("allTreeList") |
|
|
|
@ApiImplicitParams({}) |
|
|
|
@SystemControllerLog(description = "列表") |
|
|
|
public ResultData allTreeList() { |
|
|
|
public ResultData allTreeList(String tenantId) { |
|
|
|
logger.debug("[" + getIpAddr() + "] TtMerchantPoiController::allTreeList"); |
|
|
|
return new ResultData(ttMallGoodsCategoryService.findAllTreeList(getTenantInfo())); |
|
|
|
if(StringUtils.isBlank(tenantId)){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"tenantId 为null"); |
|
|
|
} |
|
|
|
return new ResultData(ttMallGoodsCategoryService.findAllTreeList(tenantId)); |
|
|
|
} |
|
|
|
|
|
|
|
@TenantIgnore |
|
|
|
@ApiOperation("设置软件服务费") |
|
|
|
@PostMapping("setMallSoftwareFee") |
|
|
|
@ApiImplicitParams({}) |
|
|
|
@@ -48,7 +59,14 @@ public class TtMallGoodsCategoryController extends BaseController { |
|
|
|
if(record.getCategoryId() == null || record.getMallSoftwareFee() == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); |
|
|
|
} |
|
|
|
record.updateTenantInfo(getTenantInfo()); |
|
|
|
if(record.getTenantId() == null){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"tenantId 为null"); |
|
|
|
} |
|
|
|
WxMall mall = wxMallService.getByTenantId(record.getTenantId()); |
|
|
|
if(mall == null){ |
|
|
|
return new ResultData(ErrorCode.MALL_INFO_NOT_FOUND); |
|
|
|
} |
|
|
|
record.updateTenantInfo(mall); |
|
|
|
|
|
|
|
ttMallGoodsCategoryService.updateFee(record); |
|
|
|
return new ResultData(); |
|
|
|
|