Commit d0b25cc8 by tangzhaoqian

Merge branch 'develop' of http://120.24.24.239:8082/8timerv2/8timerapiv200.git into tzq

parents 09c63150 cfd79ae6
......@@ -236,7 +236,7 @@
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.6.1</version>
<version>5.3.2</version>
</dependency>
<!-- lombok -->
......
......@@ -58,8 +58,8 @@ public class QyzxEntInfoM extends Model<QyzxEntInfoM> {
@ApiModelProperty(value="电话号码 ",example="18712345678")
private String phone;
@ApiModelProperty(value="所在地区",example="440111")
private Integer area;
@ApiModelProperty(value="所在地区",example="广东省广州市白云区")
private String area;
@ApiModelProperty(value="办公地址 ",example="广从一路5号柏曼酒店3楼")
private String workAddress;
......
......@@ -32,6 +32,7 @@ import com.github.pagehelper.PageHelper;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
......@@ -111,7 +112,7 @@ public class QyzxBusinessController {
QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().build()
.selectOne(new LambdaQueryWrapper<QyzxEntInfoM>().eq(QyzxEntInfoM::getId, userBean.getOrgCode()));
Date endTime = qyzxEntInfoM.getEndTime();
Long day = DateUtil.between(new Date(), endTime, DateUnit.DAY,false);
Long day = DateUtil.between(new Date(), endTime, DateUnit.DAY, false);
Integer level = qyzxEntInfoM.getLevel();
Map<String, Object> map1 = new HashMap<String, Object>();
......@@ -151,13 +152,22 @@ public class QyzxBusinessController {
@GetMapping(value = "/getPayList/System")
@ApiOperation(value = "获取系统续费商品列表", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxPayContent>> getPayListWithSystem(@CurrentUser UserBean userBean) {
List<QyzxPayContent> list = QyzxPayContent.builder().build()
.selectList(new LambdaQueryWrapper<QyzxPayContent>().eq(QyzxPayContent::getPmid, 3).select(
QyzxPayContent::getId, QyzxPayContent::getContent, QyzxPayContent::getNowPrice,
QyzxPayContent::getOriginalPrice, QyzxPayContent::getSpecification,
QyzxPayContent::getExpiration));
return ResultUtil.data(list, "获取成功");
public Result<Map<String, Object>> getPayListWithSystem(@CurrentUser UserBean userBean) {
List<QyzxPayContent> list1 = QyzxPayContent.builder().build()
.selectList(new LambdaQueryWrapper<QyzxPayContent>().eq(QyzxPayContent::getPmid, 3)
.eq(QyzxPayContent::getSpecification, 1).select(QyzxPayContent::getId,
QyzxPayContent::getNowPrice, QyzxPayContent::getOriginalPrice,
QyzxPayContent::getExpiration));
List<QyzxPayContent> list2 = QyzxPayContent.builder().build()
.selectList(new LambdaQueryWrapper<QyzxPayContent>().eq(QyzxPayContent::getPmid, 3)
.eq(QyzxPayContent::getSpecification, 2).select(QyzxPayContent::getId,
QyzxPayContent::getNowPrice, QyzxPayContent::getOriginalPrice,
QyzxPayContent::getExpiration));
Map<String, Object> map = new HashMap<String, Object>();
map.put("simple", list1);
map.put("professional", list2);
return ResultUtil.data(map, "获取成功");
}
@PostMapping(value = "/generateOrder")
......@@ -211,10 +221,33 @@ public class QyzxBusinessController {
return ResultUtil.pageData(list, page.getTotal(), "查询成功");
}
public static void main(String[] args) {
QyzxInvoiceData qyzxInvoiceData = new QyzxInvoiceData();
qyzxInvoiceData.setBankAccount("123");
qyzxInvoiceData.setBankName("234");
if (!ObjectUtil.isAllNotEmpty(qyzxInvoiceData, qyzxInvoiceData.getBankAccount(),
qyzxInvoiceData.getBankName())) {
System.out.println("请完善发票信息!");
} else {
System.err.println("可以,不错");
}
}
@PostMapping(value = "/invoicing")
@ApiOperation(value = "开发票", httpMethod = "POST", notes = "接口发布说明")
public Result<QyzxInvoiceData> generateOrder(@CurrentUser UserBean userBean,
@RequestBody QyzxInvoiceData qyzxInvoiceData) {
if (!ObjectUtil.isAllNotEmpty(qyzxInvoiceData, qyzxInvoiceData.getInvoiceTitle(),
qyzxInvoiceData.getDutyParagraph(), qyzxInvoiceData.getCompanyAddress(),
qyzxInvoiceData.getCompanyPhone(), qyzxInvoiceData.getBankName(), qyzxInvoiceData.getBankAccount(),
qyzxInvoiceData.getInvoiceType(), qyzxInvoiceData.getInvoiceProject(),
qyzxInvoiceData.getInvoiceValue(), qyzxInvoiceData.getConsignee(), qyzxInvoiceData.getConsigneePhone(),
qyzxInvoiceData.getEmail(), qyzxInvoiceData.getShippingArea(), qyzxInvoiceData.getShippingAddress(),
qyzxInvoiceData.getZipCode())) {
return ResultUtil.error("请完善发票信息!");
}
String orderNo = qyzxInvoiceData.getOrderNo();
QyzxBuyRecord qyzxBuyRecord = QyzxBuyRecord.builder().build()
.selectOne(new LambdaQueryWrapper<QyzxBuyRecord>().eq(QyzxBuyRecord::getOrderNo, orderNo));
......
......@@ -32,7 +32,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@TableName("pro_city_area_class")
@ApiModel("籍贯:地区")
public class YgAreaDto implements IYgjgDto,InitializingBean{
public class YgAreaDto {
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
......@@ -48,18 +48,6 @@ public class YgAreaDto implements IYgjgDto,InitializingBean{
@ApiModelProperty(value="名字",example="名字")
private String name;
@Autowired
private YgAreaDtoMapper ygAreaDtoMapper;
public List<String> exePunish() {
List<YgAreaDto> areaList = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).orderByAsc(YgAreaDto::getProvince).list();
List<String> a =new ArrayList<String>();
for (YgAreaDto area : areaList) { a.add(area.getName()); }
return a;
}
public void afterPropertiesSet(){
PunishFactory.registerPunish("area", this);
}
}
......@@ -14,6 +14,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import cn.hutool.core.clone.CloneRuntimeException;
import cn.hutool.core.clone.CloneSupport;
import cn.timer.api.dao.yggl.YgCityDtoMapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -32,7 +34,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@TableName("pro_city_class")
@ApiModel("籍贯:城市")
public class YgCityDto implements IYgjgDto,InitializingBean{
public class YgCityDto{
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
......@@ -48,18 +50,9 @@ public class YgCityDto implements IYgjgDto,InitializingBean{
@ApiModelProperty(value="名字",example="名字")
private String name;
@Autowired
private YgCityDtoMapper ygCityDtoMapper;
public List<String> exePunish() {
List<YgCityDto> cityList = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).orderByAsc(YgCityDto::getProvince).list();
List<String> c =new ArrayList<String>();
for (YgCityDto city : cityList) { c.add(city.getName()); }
return c;
}
public void afterPropertiesSet(){
PunishFactory.registerPunish("city", this);
}
}
......@@ -14,6 +14,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import cn.hutool.core.annotation.Alias;
import cn.timer.api.dao.yggl.YgProDtoMapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -32,7 +33,16 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@TableName("province_class")
@ApiModel("籍贯:省份")
public class YgProDto implements IYgjgDto,InitializingBean{
public class YgProDto{
/**
* @date 2020年4月29日
* @author 翁东州
* @方法中文名称:
*/
private static final long serialVersionUID = -4557120773275283842L;
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
......@@ -45,20 +55,9 @@ public class YgProDto implements IYgjgDto,InitializingBean{
@ApiModelProperty(value="名字",example="名字")
private String name;
@Autowired
private YgProDtoMapper ygProDtoMapper;
public List<String> exePunish() {
List<YgProDto> proList = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).orderByAsc(YgProDto::getProvince).list();
List<String> pList =new ArrayList<String>();
for (YgProDto pro : proList) { pList.add(pro.getName()); }
return pList;
}
public void afterPropertiesSet(){
System.out.println("初始化注入成功!");
PunishFactory.registerPunish("pro", this);
}
}
......@@ -38,6 +38,9 @@ public class YgjgDto implements Serializable{
@ApiModelProperty(value="省市区籍贯id",example="110000")
private Integer jgid;
@ApiModelProperty(value="上级id",example="110000")
private Integer upid;
@Transient
@TableField(exist = false)
private String cityname;
......
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