Commit 891ba3ff authored by 周健威's avatar 周健威

Merge remote-tracking branch 'origin/dev-chw' into dev-chw

parents 328075f3 c19673ee
......@@ -50,12 +50,12 @@ weixinHost=chwtest.upyuns.com
APICLIENT_CERT=D:\\cert\\1514583081_20181017_cert.p12
#\u652F\u4ED8\u5B9D\u914D\u7F6E
ALIPAY_APPID=2019070965781964
ALIPAY_PID=2088531634846583
ALIPAY_APPID=2021002105612008
ALIPAY_PID=2088231782582000
#\u652F\u4ED8\u5B9D\u516C\u94A5
ALIPAY_PUBLIC_KEY=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAj/EMaAD2iJP3I5M0g6pssDDe3RxF5I3ECM/Kz/btM0RiW2g5oRrHSjtGuos9l1QhQAY0SrVqa2eZdPKUB3ZqJdimQiXr3dbiMvG9UCs8vVUcrtCHCBjDllKQLiYzboxE6JLXyfII5tIXbFKiGyiEyXQnffUhQ9uGyT2EGWGecz6PLIjDdbwpxuzF2gIUzV3bPxb+0axejBxJ/3zKnWrsbyq2nvs8XrzrR2CEggNqgqsKzaacCL1yZjXzQRseSnCMtgSxR5W5afbdY0zqbUlLHUrUZ8ycCRC0ECuI9HyTbuqtdWHEZH7vIH44wEQWZPDRhMfMZvzmPUgpTWZLv5BtaQIDAQAB
ALIPAY_ACOUNT=xxfc810@163.com
ALIPAY_PRIVATE_KEY=MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC0wXVGAameVSLlLrq7edrMuoabN16/bYJNosLmPlHltEhehKO1ak/oIFvlKGyKwsW+xXd8t27p5hpsHqzNisU/jLbwEi6t0U/RBMbx3ult9zNhsZqSdJxe4QINChudVM6FdE8ssaq19ABwiLisMxxck0IiXDmesGI6vUSNzLEvKyYWTUsVsW1HgYXVjXmi8mOiwuFsJtdALS/psWci3UlX80rYG9KGqSBWT0B0Nr8UcM1L7UEkOHUEf1uq4Ipl5rTzgqoRQN5uHbBu50b7welAL2MFA9D/Ecv+FOfMI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0Ui75QwgeeU9I6Ns65y0g/MRz8VjJ5XQeI5PAK575sy2UTMClt3ep1X6vgLdl12g9qkiljN7mWUv4su+X+k+8zYDUcWm17KsGVNg+WrUAdRoWbkZUGW8=
#
#ALIPAY_APPID=2016100100641990
#ALIPAY_PID=2088102178153042
......
......@@ -23,5 +23,7 @@ public class BaseOrderAcceptDetailedDTO extends PageParam implements DataInter {
List<Integer> divisionTypes;
private Integer acceptId;
}
......@@ -125,4 +125,20 @@ public interface UserRestInterface {
return null;
}
default void setPowerDataCorporation(DataInter dataInter){
UserDTO userDTO = getAdminUserInfoV2(true);
if (userDTO == null) {
return;
}
dataInter.setBizType(userDTO.getBizType());
Integer dataAll=userDTO.getDataAll()== null ? 2 : userDTO.getDataAll();
if (dataAll == 2){
List<Integer> dataCorporation2List = userDTO.dataCorporation2List() == null ? new ArrayList<>() : userDTO.dataCorporation2List();
if (dataCorporation2List.size() == 0) {
dataCorporation2List.add(0);
}
dataInter.setDataCorporationIds(dataCorporation2List);
}
}
}
......@@ -5,6 +5,8 @@ import com.github.wxiaoqi.security.admin.entity.CompanyWallet;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class CompanyWalletVo extends CompanyWallet {
......@@ -18,4 +20,16 @@ public class CompanyWalletVo extends CompanyWallet {
@ApiModelProperty("企业名称")
private Long branchId;
@ApiModelProperty("今日营收")
private BigDecimal todayAmount;
@ApiModelProperty("未入账")
private BigDecimal notDoAmount;
}
......@@ -97,11 +97,16 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl
if(collectDTO==null){
return ObjectRestResponse.createFailedResult(ResultCode.NULL_CODE, "参数为空");
}
AppUserCollect collect=new AppUserCollect();
BeanUtils.copyProperties(collectDTO,collect);
updateSelectiveById(collect);
List<AppUserCollect> list = getList(collectDTO);
if (list.size() > 0){
for (AppUserCollect appUserCollect:list){
appUserCollect.setStatus(1);
updateSelectiveById(appUserCollect);
}
}
return ObjectRestResponse.succ();
}
//查看是否收藏
public ObjectRestResponse checkUserCollect(String id,Integer userId,Integer type){
Example example = new Example(AppUserCollect.class);
......@@ -120,6 +125,14 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl
obj.put("id",collect_id);
return ObjectRestResponse.succ(obj);
}
public List<AppUserCollect> getList(AppUserCollectDTO collectDTO){
Example example = new Example(AppUserCollect.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("userId",collectDTO.getUserId()).andEqualTo("typeId",collectDTO.getTypeId()).
andEqualTo("type",collectDTO.getType()).andEqualTo("isDel",0).andEqualTo("status",0);
return selectByExample(example);
}
//我的收藏
public ObjectRestResponse getCollectList(Integer userId,int page,int limit){
Example example = new Example(AppUserCollect.class);
......
......@@ -91,7 +91,10 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
sellingWaterBiz.updWalletByOrderId(orderWaterDTO);
companyWalletDetailBiz.addOrUpd(orderWaterDTO);
}else if (status == 3){
othderAccept(orderDetailDTO);
Integer acceptId = othderAccept(orderDetailDTO);
if (acceptId != null && acceptId > 0){
companyWalletDetailBiz.saveById(acceptId);
}
}else if (status == 4){
refundOrderAccept(orderWaterDTO);
sellingWaterBiz.updWalletByOrderId(orderWaterDTO);
......@@ -323,7 +326,7 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
}
public void othderAccept(OrderDetailDTO orderDetailDTO){
public Integer othderAccept(OrderDetailDTO orderDetailDTO){
OrderRentVehicleDetail rentVehicleDetail = orderDetailDTO.getRentVehicleDetail();
BaseOrderAcceptDetailed acceptDetailed=new BaseOrderAcceptDetailed();
BeanUtils.copyProperties(orderDetailDTO,acceptDetailed);
......@@ -352,6 +355,7 @@ public class BaseOrderAcceptDetailedBiz extends BaseBiz<BaseOrderAcceptDetailedM
acceptDetailed.setDivisionType(7);
insertSelective(acceptDetailed);
}
return acceptDetailed.getId();
}
......
......@@ -89,6 +89,7 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
public ObjectRestResponse getHotCompany(Integer page,Integer limit){
Example example = new Example(BranchCompany.class);
example.createCriteria().andEqualTo("state",1).andEqualTo("isDel",0);
example.orderBy("browseNum").asc();
PageDataVO<BranchCompany> pageDataVO = PageDataVO.pageInfo(page, limit, () -> mapper.selectByExample(example));
return ObjectRestResponse.succ(pageDataVO);
......
......@@ -59,6 +59,18 @@ public class CompanyWalletBiz extends BaseBiz<CompanyWalletMapper, CompanyWallet
return PageDataVO.pageInfo(walletDTO.getPage(), walletDTO.getLimit(), () -> getList(walletDTO));
}
public CompanyWalletVo info(CompanyWalletDTO walletDTO){
List<CompanyWalletVo> list = mapper.selectList(walletDTO);
if (list.size() > 0) {
CompanyWalletVo companyWalletVo = list.get(0);
companyWalletVo.setTodayAmount(mapper.todayAmount(companyWalletVo.getCompanyId()));
companyWalletVo.setNotDoAmount(mapper.notDoAmount(companyWalletVo.getCompanyId()));
return companyWalletVo;
}
return null;
}
......
......@@ -57,12 +57,27 @@ public class CompanyWalletDetailBiz extends BaseBiz<CompanyWalletDetailMapper, C
divisionTypes.add(6);
divisionTypes.add(7);
divisionTypes.add(8);
BaseOrderAcceptDetailedDTO acceptDetailedDTO = BaseOrderAcceptDetailedDTO
BaseOrderAcceptDetailedDTO acceptDetailedDTO = BaseOrderAcceptDetailedDTO
.builder()
.orderNo(orderWaterDTO.getOrderNo())
.divisionTypes(divisionTypes)
.build();
acceptDetailedDTO.setOrderNo(orderWaterDTO.getOrderNo());
updByIdOrOrderNo(acceptDetailedDTO);
}
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public void saveById(Integer acceptId){
if (acceptId == null || acceptId == 0){
throw new BaseException("分账信息不存在",ResultCode.FAILED_CODE);
}
BaseOrderAcceptDetailedDTO acceptDetailedDTO = BaseOrderAcceptDetailedDTO
.builder()
.acceptId(acceptId)
.build();
updByIdOrOrderNo(acceptDetailedDTO);
}
public void updByIdOrOrderNo(BaseOrderAcceptDetailedDTO acceptDetailedDTO){
List<BaseOrderAcceptDetailedVO> list = acceptDetailedBiz.getList(acceptDetailedDTO);
List<CompanyWalletDetail> walletDetails = new ArrayList<>();
if (list.size() > 0){
......@@ -96,7 +111,6 @@ public class CompanyWalletDetailBiz extends BaseBiz<CompanyWalletDetailMapper, C
.collect(Collectors.groupingBy(CompanyWalletDetail::getCompanyId, CollectorsUtil.summingBigDecimal(CompanyWalletDetail::getAmount)));
amountSum.forEach((k,v) -> updCompanyWallet(k,v));
}
}
......
......@@ -30,4 +30,5 @@ public interface CompanyWalletDetailMapper extends Mapper<CompanyWalletDetail> {
BigDecimal sumAmount(WalletDetailDTO walletDetailDTO);
}
......@@ -8,9 +8,11 @@ import com.github.wxiaoqi.security.admin.dto.WalletDetailDTO;
import com.github.wxiaoqi.security.admin.entity.CompanyWallet;
import com.github.wxiaoqi.security.admin.vo.CompanyWalletVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;
import java.math.BigDecimal;
import java.util.List;
/**
......@@ -33,4 +35,12 @@ public interface CompanyWalletMapper extends Mapper<CompanyWallet> {
List<CompanyWalletVo> selectList(CompanyWalletDTO walletDTO);
@Select("SELECT IFNULL(SUM(amount),0) FROM company_wallet_detail WHERE type=1 and company_id=#{companyId} and from_unixtime(crt_time/1000,'%Y-%m-%d')=date_format(now(),'%Y-%m-%d')")
BigDecimal todayAmount(@Param("companyId") Integer companyId);
@Select("SELECT IFNULL(SUM(division_amount-fee),0) FROM base_order_accept_detailed WHERE `status`=0 and mch_id=#{companyId} and division_type in (3,5,6,7,8)")
BigDecimal notDoAmount(@Param("companyId") Integer companyId);
}
......@@ -51,6 +51,7 @@ public class AppBranchCompanyController extends BaseController<BranchCompanyBiz>
@ApiModelProperty("店铺列表")
@IgnoreUserToken
public ObjectRestResponse selectList(CompanySearchDTO companySearchDTO) {
companySearchDTO.setState(1);
return ObjectRestResponse.succ( baseBiz.search(companySearchDTO));
}
......
package com.github.wxiaoqi.security.admin.rest;
import com.github.wxiaoqi.security.admin.biz.CompanyWalletBiz;
import com.github.wxiaoqi.security.admin.dto.CompanyWalletDTO;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author Administrator
*/
@Slf4j
@RestController
@RequestMapping("app/companyWallet")
@RequiredArgsConstructor(onConstructor_ = {@Autowired})
@Api(tags = {"店铺钱包"})
public class AppCompanyWalletController extends BaseController<CompanyWalletBiz> {
@GetMapping("info")
@ApiModelProperty("店铺营收信息")
@IgnoreUserToken
public ObjectRestResponse info(CompanyWalletDTO companyWalletDTO) {
if (companyWalletDTO.getCompanyId() == null || companyWalletDTO.getCompanyId() == 0){
List<Integer> companyIds = getBusinessUserCompanyIds();
if (companyIds != null && companyIds.size() > 0){
companyWalletDTO.setCompanyId(companyIds.get(0));
}
}
return ObjectRestResponse.succ(baseBiz.info(companyWalletDTO));
}
}
......@@ -94,8 +94,9 @@ public class AppUserCollectController extends CommonBaseController {
@RequestMapping(value = "/collect/remove",method = RequestMethod.POST)
@ApiModelProperty("取消收藏")
public ObjectRestResponse remove(@RequestBody AppUserCollectDTO collectDTO)throws Exception {
collectDTO.setStatus(1);
collectDTO.setUserId(getCurrentUserIdInt());
return collectBiz.upUserCollect(collectDTO);
}
@GetMapping("/collect/exist")
......
......@@ -94,7 +94,7 @@ public class AdminCompanyInfoController extends BaseController<CompanyInfoApplyB
@ApiModelProperty("商家信息")
public ObjectRestResponse info() {
CompanyInfoFindDTO companyInfoFindDTO=new CompanyInfoFindDTO();
setPowerData(companyInfoFindDTO);
setPowerDataCorporation(companyInfoFindDTO);
List<CompanyInfo> list = companyInfoBiz.getList(companyInfoFindDTO);
if (list == null || list.size() == 0){
throw new BaseException("商家不存在", ResultCode.FAILED_CODE);
......
package com.github.wxiaoqi.security.admin.rest.admin;
import com.github.wxiaoqi.security.admin.biz.CompanyWalletBiz;
import com.github.wxiaoqi.security.admin.biz.CompanyWalletCathBiz;
import com.github.wxiaoqi.security.admin.biz.CompanyWalletDetailBiz;
import com.github.wxiaoqi.security.admin.dto.*;
import com.github.wxiaoqi.security.admin.entity.CompanyWalletCath;
import com.github.wxiaoqi.security.admin.entity.CompanyWalletDetail;
import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface;
import com.github.wxiaoqi.security.admin.vo.CompanyWalletDetailVo;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("backstage/wallet")
public class AdminCompanyWalletDetailController extends BaseController<CompanyWalletDetailBiz, CompanyWalletDetail> implements UserRestInterface {
@Autowired
UserFeign userFeign;
@Override
public UserFeign getUserFeign() {
return userFeign;
}
@Autowired
CompanyWalletCathBiz walletCathBiz;
@Autowired
CompanyWalletBiz walletBiz;
@RequestMapping(value = "selectList", method = RequestMethod.GET)
@ApiModelProperty(value = "营收明细列表")
public ObjectRestResponse<PageDataVO<CompanyWalletDetailVo>> selectList(WalletDetailDTO walletDetailDTO) {
setPowerData(walletDetailDTO);
return ObjectRestResponse.succ(baseBiz.selectList(walletDetailDTO));
}
@RequestMapping(value = "sumAmount", method = RequestMethod.GET)
@ApiModelProperty(value = "营收统计")
public ObjectRestResponse sumAmount(WalletDetailDTO walletDetailDTO) {
setPowerData(walletDetailDTO);
return ObjectRestResponse.succ(baseBiz.getSumAmount(walletDetailDTO));
}
@RequestMapping(value = "cath/selectList", method = RequestMethod.GET)
@ApiModelProperty(value = "提现明细列表")
public ObjectRestResponse<PageDataVO<CompanyWalletDetailVo>> cathSelectList(WalletCathDTO walletCathDTO) {
setPowerData(walletCathDTO);
return ObjectRestResponse.succ(walletCathBiz.selectList(walletCathDTO));
}
@RequestMapping(value = "amount/selectList", method = RequestMethod.GET)
@ApiModelProperty(value = "钱包列表")
public ObjectRestResponse<PageDataVO<CompanyWalletDetailVo>> amountSelectList(CompanyWalletDTO walletDTO) {
setPowerData(walletDTO);
return ObjectRestResponse.succ(walletBiz.selectList(walletDTO));
}
@RequestMapping(value = "applyCath", method = RequestMethod.POST)
@ApiModelProperty(value = "提现申请")
public ObjectRestResponse applyCath(@RequestBody CompanyWalletCath walletCathDTO) {
walletCathBiz.applyCath(walletCathDTO);
return ObjectRestResponse.succ();
}
@RequestMapping(value = "applyCathList", method = RequestMethod.POST)
@ApiModelProperty(value = "提现申请List")
public ObjectRestResponse applyCathList(@RequestBody WalletCathApplyDTO walletCathApplyDTO) {
walletCathBiz.applyCathList(walletCathApplyDTO);
return ObjectRestResponse.succ();
}
@RequestMapping(value = "withDrawProcess", method = RequestMethod.POST)
@ApiModelProperty(value = "提现审核")
public ObjectRestResponse withDrawProcess(@RequestBody CompanyWalletCath companyWalletCath) {
walletCathBiz.withDrawProcess(companyWalletCath);
return ObjectRestResponse.succ();
}
}
\ No newline at end of file
......@@ -362,7 +362,6 @@ public class AppPermissionService {
//生成邀请码 长度改为8 不然重复率太高
rsUserDetail.setCode(ReferralCodeUtil.encode(userid));
log.info("register------username====="+username+"----channel===="+channel);
channel=-1;
rsUserDetail.setChannel(channel);
rsUserDetail.setRegisterSource(registerSource);
appUserDetailBiz.insertSelective(rsUserDetail);
......@@ -1104,7 +1103,6 @@ public class AppPermissionService {
rsUserDetail.setCode(ReferralCodeUtil.encode(userid));
//设置来源
log.info("register------username====="+username+"----channel===="+UserSourceEnum.APPLET.getCode());
rsUserDetail.setChannel(-1);
rsUserDetail.setCrtHost(getIp());
//setCreateIPInfo(rsUserDetail);
rsUserDetail.setState(1);
......
......@@ -3,7 +3,7 @@
<mapper namespace="com.github.wxiaoqi.security.admin.mapper.BaseOrderAcceptDetailedMapper">
<select id="selectList" parameterType="com.github.wxiaoqi.security.admin.entity.BaseOrderAcceptDetailed" resultType="com.github.wxiaoqi.security.admin.vo.BaseOrderAcceptDetailedVO">
<select id="selectList" parameterType="com.github.wxiaoqi.security.admin.dto.BaseOrderAcceptDetailedDTO" resultType="com.github.wxiaoqi.security.admin.vo.BaseOrderAcceptDetailedVO">
SELECT
r.*,
SUM(r.zDivisionAmount)-SUM(r.fDivisionAmount) as divisionAmount
......@@ -11,7 +11,13 @@
(
SELECT mch_id,order_no,order_id,user_id,division_type,entry_type,order_amount,(division_amount-fee) as zDivisionAmount, 0 as fDivisionAmount,fee,status_time FROM base_order_accept_detailed
WHERE type=1 AND order_no=#{orderNo} AND `status`=1
WHERE type=1 AND `status`=1
<if test="orderNo != null and orderNo != ''">
AND order_no=#{orderNo}
</if>
<if test="acceptId != null and acceptId > 0">
AND id=#{acceptId}
</if>
<if test="divisionTypes != null and divisionTypes.size() > 0">
and division_type in
<foreach collection="divisionTypes" item="divisionType" open="(" separator="," close=")">
......@@ -22,7 +28,13 @@
UNION ALL
SELECT mch_id,order_no,order_id,user_id,division_type,entry_type,order_amount,0 as zDivisionAmount, (division_amount-fee) as fDivisionAmount,fee,status_time FROM base_order_accept_detailed
WHERE type=2 AND order_no=#{orderNo} AND `status`=1
WHERE type=2 AND `status`=1
<if test="orderNo != null and orderNo != ''">
AND order_no=#{orderNo}
</if>
<if test="acceptId != null and acceptId > 0">
AND id=#{acceptId}
</if>
<if test="divisionTypes != null and divisionTypes.size() > 0">
and division_type in
<foreach collection="divisionTypes" item="divisionType" open="(" separator="," close=")">
......
......@@ -58,7 +58,9 @@ public class ActivityBiz extends BaseBiz<ActivityMapper, Activity> {
List<AppUserVo> appUserVos = userFeign.getByUserIds(userIds).getData();
Map<Integer, AppUserVo> userMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(appUserVos)){
userMap = appUserVos.stream().collect(Collectors.toMap(AppUserVo::getUserid, Function.identity()));
for (AppUserVo appUserVo:appUserVos){
userMap.put(appUserVo.getId(),appUserVo);
}
}
for(ActivityVo activityVo : list){
AppUserVo appUserVo = userMap.get(activityVo.getUserId());
......
......@@ -35,6 +35,7 @@
select a.*,t.name as typeName from `activity` a
LEFT JOIN activity_type t on a.type=t.type
<where>
a.is_del = 0
<if test="goodsType != null">
and a.`goods_type`=#{goodsType}
</if>
......
......@@ -5,7 +5,7 @@ import java.io.File;
public class ImageUtils {
public static String getClickWordBgPath (){
String imagePath = "/data/www/resources/images/pic-click";
String imagePath = "/data/sdb/www/chw_resources/images/pic-click";
File file = new File(imagePath);
String[] files = file.list();
int randomNum = RandomUtils.getRandomInt(1 , files.length);
......@@ -15,7 +15,7 @@ public class ImageUtils {
public static String getBlockPuzzleBgPath (){
String imagePath = "/data/www/resources/images/jigsaw/original";
String imagePath = "/data/sdb/www/chw_resources/images/jigsaw/original";
File file = new File(imagePath);
String[] files = file.list();
int randomNum = RandomUtils.getRandomInt(1 , files.length);
......
......@@ -116,7 +116,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper, OrderPay>{
jsParam = WXPay.apppay(amount + "", orderPayVo.getBody(), notify_url, trade_no, orderPayVo.getBuyerIp(), 0);
} else if (type == 1 && payWay == 2) {
sellerAccount = SystemConfig.ALIPAY_PID;
orderPayVo.setPayType(2);
orderPayVo.setPayType(1);
jsParam = generateAliPayment(orderPayVo, notifyUrl);
} else if (type == 3 && payWay == 1) {
sellerAccount = SystemConfig.APP_PARTNER;
......
......@@ -49,6 +49,7 @@ public class VehicleApplyBiz extends BaseBiz<VehicleApplyMapper, VehicleApply>{
if (list.size() > 0){
throw new BaseException("公司名称不能重复",ResultCode.FAILED_CODE);
}*/
setPriceType(vehicle);
VehicleApply vehicleApply=new VehicleApply();
BeanUtils.copyProperties(vehicle,vehicleApply);
Integer formType=2;
......@@ -79,6 +80,17 @@ public class VehicleApplyBiz extends BaseBiz<VehicleApplyMapper, VehicleApply>{
return vehicleApply;
}
public void setPriceType(Vehicle vehicle){
Integer goodsType = vehicle.getGoodsType() == null ? 0 : vehicle.getGoodsType();
if (goodsType > 0){
if (goodsType == 1 || goodsType == 2){
vehicle.setPriceType(1);
}else if (goodsType == 3){
vehicle.setPriceType(2);
}
}
}
public Long checkStatus(String vehicleId){
VehicleApply vehicleApply=new VehicleApply();
vehicleApply.setVehicleId(vehicleId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment